diff --git a/README.md b/README.md index 69c3fe5..c404716 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ License ## Latest Version +- [3.0.0](/versions/3.0.0/README.md) + + - Handle "text/plain" content type as file download. + - [2.0.0](/versions/2.0.0/README.md) - Handled Error Structure in MassDeleteTags API. @@ -63,7 +67,7 @@ You can include the SDK to your project using: - Package Manager ```sh - Install-Package ZOHOCRMSDK-7.0 -Version 2.0.0 + Install-Package ZOHOCRMSDK-7.0 -Version 3.0.0 Install-Package MySql.Data -Version 6.9.12 Install-Package Newtonsoft.Json -Version 13.0.1 ``` @@ -71,7 +75,7 @@ You can include the SDK to your project using: - .NET CLI ```sh - dotnet add package ZOHOCRMSDK-7.0 --version 2.0.0 + dotnet add package ZOHOCRMSDK-7.0 --version 3.0.0 dotnet add package Newtonsoft.Json --version 13.0.1 dotnet add package MySql.Data --version 6.9.12 ``` @@ -82,7 +86,7 @@ You can include the SDK to your project using: ```sh - + @@ -102,4 +106,4 @@ For example, if you generate the tokens for your Sandbox environment in the CN d --- -For more details, kindly refer [here](/versions/2.0.0/ZohoCRM/README.md). \ No newline at end of file +For more details, kindly refer [here](/versions/3.0.0/ZohoCRM/README.md). \ No newline at end of file diff --git a/ZohoCRM/Com/Zoho/Crm/API/Util/CommonAPIHandler.cs b/ZohoCRM/Com/Zoho/Crm/API/Util/CommonAPIHandler.cs index 12d8d9e..bdf3e69 100644 --- a/ZohoCRM/Com/Zoho/Crm/API/Util/CommonAPIHandler.cs +++ b/ZohoCRM/Com/Zoho/Crm/API/Util/CommonAPIHandler.cs @@ -326,13 +326,12 @@ public Converter GetConverterClassInstance(string encodeType) case "application/json": case "application/ld+json": return new JSONConverter(this); - case "text/plain": - return new TextConverter(this); case "application/xml": case "text/xml": return new XMLConverter(this); case "multipart/form-data": return new FormDataConverter(this); + case "text/plain": case "image/png": case "image/jpeg": case "image/gif": diff --git a/ZohoCRM/Com/Zoho/Crm/API/Util/Constants.cs b/ZohoCRM/Com/Zoho/Crm/API/Util/Constants.cs index f0abdb5..a991d25 100644 --- a/ZohoCRM/Com/Zoho/Crm/API/Util/Constants.cs +++ b/ZohoCRM/Com/Zoho/Crm/API/Util/Constants.cs @@ -55,7 +55,7 @@ public static class Constants public static readonly string LOG_FILE_NAME = "sdk_logs.log"; public static readonly string TOKEN_FILE = "sdk_tokens.txt"; public static readonly string ZOHO_SDK = "X-ZOHO-SDK"; - public static readonly string SDK_VERSION = "2.0.0"; + public static readonly string SDK_VERSION = "3.0.0"; public static readonly string MODULEPACKAGENAME = "modulePackageName"; public static readonly string MODULEDETAILS = "moduleDetails"; public static readonly string DATATYPECONVERTER = "Com.Zoho.Crm.API.Util.DataTypeConverter`1[[$type]], ZOHOCRMSDK-7.0"; diff --git a/ZohoCRM/Com/Zoho/Crm/API/Util/Utility.cs b/ZohoCRM/Com/Zoho/Crm/API/Util/Utility.cs index 45161fb..b2d9a09 100644 --- a/ZohoCRM/Com/Zoho/Crm/API/Util/Utility.cs +++ b/ZohoCRM/Com/Zoho/Crm/API/Util/Utility.cs @@ -28,7 +28,7 @@ public class Utility private static Dictionary apiTypeVsDataType = new Dictionary(); private static Dictionary apiTypeVsStructureName = new Dictionary(); private static bool newFile = false; - private static bool getModifiedModules = false; + private static bool getModifiedModules = false; private static bool forceRefresh = false; private static string moduleAPIName; private static JObject apiSupportedModule = new JObject(); diff --git a/ZohoCRM/README.md b/ZohoCRM/README.md index 67bd421..4f48dd8 100755 --- a/ZohoCRM/README.md +++ b/ZohoCRM/README.md @@ -74,7 +74,7 @@ You can include the SDK to your project using: - Package Manager ```sh - Install-Package ZOHOCRMSDK-7.0 -Version 2.0.0 + Install-Package ZOHOCRMSDK-7.0 -Version 3.0.0 Install-Package MySql.Data -Version 6.9.12 Install-Package Newtonsoft.Json -Version 13.0.1 ``` @@ -82,7 +82,7 @@ You can include the SDK to your project using: - .NET CLI ```sh - dotnet add package ZOHOCRMSDK-7.0 --version 2.0.0 + dotnet add package ZOHOCRMSDK-7.0 --version 3.0.0 dotnet add package Newtonsoft.Json --version 13.0.1 dotnet add package MySql.Data --version 6.9.12 ``` @@ -93,7 +93,7 @@ You can include the SDK to your project using: ```sh - + diff --git a/ZohoCRM/ZOHOCRMSDK-7.0.csproj b/ZohoCRM/ZOHOCRMSDK-7.0.csproj index cddcaec..51ecba3 100644 --- a/ZohoCRM/ZOHOCRMSDK-7.0.csproj +++ b/ZohoCRM/ZOHOCRMSDK-7.0.csproj @@ -19,7 +19,7 @@ true en-US ZOHOCRMSDK-7.0 - 2.0.0 + 3.0.0 Zoho CRM API Team Zoho CRM API Team Provides C# SDK support for Zoho CRM APIs. diff --git a/ZohoCRM/readme.txt b/ZohoCRM/readme.txt index a7d5885..1d3cbf6 100644 --- a/ZohoCRM/readme.txt +++ b/ZohoCRM/readme.txt @@ -1,14 +1,14 @@ ———————————————————————— -Zoho CRM C# SDK 2.0.0 +Zoho CRM C# SDK 3.0.0 ———————————————————————— -This is the readme file for Zoho CRM’s C# SDK version 2.0.0. +This is the readme file for Zoho CRM’s C# SDK version 3.0.0. This file gives a brief of the enhancements and/or bug fixes in the latest version. ---------------- Enhancements ---------------- - - Handled Error Structure in MassDeleteTags API. + - Handle "text/plain" content type as file download You can also take a look at our GitHub page here (https://github.com/zoho/zohocrm-csharp-sdk-7.0/blob/master/README.md) \ No newline at end of file diff --git a/versions/3.0.0/Samples/APIS/GetSupportedAPI.cs b/versions/3.0.0/Samples/APIS/GetSupportedAPI.cs new file mode 100644 index 0000000..62726df --- /dev/null +++ b/versions/3.0.0/Samples/APIS/GetSupportedAPI.cs @@ -0,0 +1,99 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; +using Com.Zoho.Crm.API.APIs; + +namespace Samples.APIS +{ + public class GetSupportedAPI + { + public static void GetSupportedAPI_1() + { + String filters = null; + APIsOperations apisOperations = new APIsOperations(filters); + APIResponse response = apisOperations.GetSupportedAPI(); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (new List() { 204, 304 }.Contains(response.StatusCode)) + { + Console.WriteLine(response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper)responseHandler; + List apis = responseWrapper.Apis; + foreach (SupportedAPI api in apis) + { + Console.WriteLine("API Path : " + api.Path); + List operationTypes = api.OperationTypes; + foreach (OperationTypes operationType in operationTypes) + { + Console.WriteLine("API Operation Method : " + operationType.Method); + Console.WriteLine("API Operation OAuthScope : " + operationType.OauthScope); + Console.WriteLine("API Operation MaxCredits : " + operationType.MaxCredits); + Console.WriteLine("API Operation MinCredits : " + operationType.MinCredits); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException)responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + System.Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetSupportedAPI_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/AuditLogExport1/CreateAuditlogExport.cs b/versions/3.0.0/Samples/AuditLogExport1/CreateAuditlogExport.cs new file mode 100644 index 0000000..c152b49 --- /dev/null +++ b/versions/3.0.0/Samples/AuditLogExport1/CreateAuditlogExport.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.API.Authenticator; +using Com.Zoho.Crm.API.AuditLogExport; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Samples.AuditLogExport1 +{ + public class CreateAuditlogExport + { + public static void CreateAuditlogExport_1() + { + AuditLogExportOperations auditLogExportOperations = new AuditLogExportOperations(); + BodyWrapper request = new BodyWrapper(); + List auditLogExport = new List(); + AuditLogExport auditLogExport1 = new AuditLogExport(); + Criteria criteria = new Criteria(); + criteria.Comparator = "between"; + Field field = new Field(); + field.APIName = "audited_time"; + criteria.Field = field; + List values = new List(); + values.Add(new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + values.Add(new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + criteria.Value = values; + auditLogExport1.Criteria = criteria; + auditLogExport.Add(auditLogExport1); + request.AuditLogExport = auditLogExport; + APIResponse response = auditLogExportOperations.CreateAuditlogExport(request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper)actionHandler; + List actionresponses = actionWrapper.AuditLogExport; + foreach (ActionResponse actionresponse in actionresponses) + { + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse)actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException)actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + System.Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + CreateAuditlogExport_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } +} +} + diff --git a/versions/3.0.0/Samples/AuditLogExport1/GetExportedAuditlog.cs b/versions/3.0.0/Samples/AuditLogExport1/GetExportedAuditlog.cs new file mode 100644 index 0000000..3cb30d0 --- /dev/null +++ b/versions/3.0.0/Samples/AuditLogExport1/GetExportedAuditlog.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.API.Authenticator; +using Com.Zoho.Crm.API.AuditLogExport; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Samples.AuditLogExport1 +{ + public class GetExportedAuditlog + { + public static void GetExportedAuditlog_1(long Id) + { + AuditLogExportOperations auditLogExportOperations = new AuditLogExportOperations(); + APIResponse response = auditLogExportOperations.GetExportedAuditlog(Id); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ResponseHandler actionHandler = response.Object; + if (actionHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper)actionHandler; + List auditLogExport = responseWrapper.AuditLogExport; + if (auditLogExport != null) + { + foreach (AuditLogExport auditLogExport1 in auditLogExport) + { + Criteria criteria = auditLogExport1.Criteria; + if (criteria != null) + { + PrintCriteria(criteria); + } + Console.WriteLine("AuditLogExport Id : " + auditLogExport1.Id); + Console.WriteLine("AuditLogExport Status : " + auditLogExport1.Status); + User createdBy = auditLogExport1.CreatedBy; + if(createdBy != null) + { + Console.WriteLine("AuditLogExport User Id : " + createdBy.Id); + Console.WriteLine("AuditLogExport User Id : " + createdBy.Name); + } + List downloadLinks = auditLogExport1.DownloadLinks; + if(downloadLinks != null) + { + foreach (String link in downloadLinks) + { + Console.WriteLine("AuditLogExport DownloadLink : " + link); + } + } + Console.WriteLine("AuditLogExport JobStartTime : " + auditLogExport1.JobStartTime); + Console.WriteLine("AuditLogExport JobEndTime : " + auditLogExport1.JobEndTime); + Console.WriteLine("AuditLogExport ExpiryDate : " + auditLogExport1.ExpiryDate); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + System.Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + private static void PrintCriteria(Criteria criteria) + { + if (criteria.Comparator != null) + { + Console.WriteLine("ExportedAuditlogs Criteria Comparator: " + criteria.Comparator); + } + if (criteria.Value != null) + { + Console.WriteLine("ExportedAuditlogs Criteria Value: " + criteria.Value); + } + if (criteria.Field != null) + { + Console.WriteLine("ExportedAuditlogs Criteria field name: " + criteria.Field.APIName); + } + List criteriaGroup = criteria.Group; + if (criteriaGroup != null) + { + foreach (Criteria criteria1 in criteriaGroup) + { + PrintCriteria(criteria1); + } + } + if (criteria.GroupOperator != null) + { + Console.WriteLine("ExportedAuditlogs Criteria Group Operator: " + criteria.GroupOperator); + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long Id = 0; + GetExportedAuditlog_1(Id); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/AuditLogExport1/GetExportedAuditlogs.cs b/versions/3.0.0/Samples/AuditLogExport1/GetExportedAuditlogs.cs new file mode 100644 index 0000000..b6c6704 --- /dev/null +++ b/versions/3.0.0/Samples/AuditLogExport1/GetExportedAuditlogs.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.API.Authenticator; +using Com.Zoho.Crm.API.AuditLogExport; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Samples.AuditLogExport1 +{ + public class GetExportedAuditlogs + { + public static void GetExportedAuditlogs_1() + { + AuditLogExportOperations auditLogExportOperations = new AuditLogExportOperations(); + APIResponse response = auditLogExportOperations.GetExportedAuditlogs(); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ResponseHandler actionHandler = response.Object; + if (actionHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper)actionHandler; + List auditLogExport = responseWrapper.AuditLogExport; + if (auditLogExport != null) + { + foreach (AuditLogExport auditLogExport1 in auditLogExport) + { + Criteria criteria = auditLogExport1.Criteria; + if (criteria != null) + { + PrintCriteria(criteria); + } + Console.WriteLine("AuditLogExport Id : " + auditLogExport1.Id); + Console.WriteLine("AuditLogExport Status : " + auditLogExport1.Status); + User createdBy = auditLogExport1.CreatedBy; + if(createdBy != null) + { + Console.WriteLine("AuditLogExport User Id : " + createdBy.Id); + Console.WriteLine("AuditLogExport User Id : " + createdBy.Name); + } + List downloadLinks = auditLogExport1.DownloadLinks; + if(downloadLinks != null) + { + foreach (String link in downloadLinks) + { + Console.WriteLine("AuditLogExport DownloadLink : " + link); + } + } + Console.WriteLine("AuditLogExport JobStartTime : " + auditLogExport1.JobStartTime); + Console.WriteLine("AuditLogExport JobEndTime : " + auditLogExport1.JobEndTime); + Console.WriteLine("AuditLogExport ExpiryDate : " + auditLogExport1.ExpiryDate); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + System.Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + private static void PrintCriteria(Criteria criteria) + { + if (criteria.Comparator != null) + { + Console.WriteLine("ExportedAuditlogs Criteria Comparator: " + criteria.Comparator); + } + if (criteria.Value != null) + { + Console.WriteLine("ExportedAuditlogs Criteria Value: " + criteria.Value); + } + if (criteria.Field != null) + { + Console.WriteLine("ExportedAuditlogs Criteria field name: " + criteria.Field.APIName); + } + List criteriaGroup = criteria.Group; + if (criteriaGroup != null) + { + foreach (Criteria criteria1 in criteriaGroup) + { + PrintCriteria(criteria1); + } + } + if (criteria.GroupOperator != null) + { + Console.WriteLine("ExportedAuditlogs Criteria Group Operator: " + criteria.GroupOperator); + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetExportedAuditlogs_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/Blueprint/GetBlueprint.cs b/versions/3.0.0/Samples/Blueprint/GetBlueprint.cs new file mode 100644 index 0000000..5bd8a57 --- /dev/null +++ b/versions/3.0.0/Samples/Blueprint/GetBlueprint.cs @@ -0,0 +1,398 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using APIException = Com.Zoho.Crm.API.Blueprint.APIException; +using BlueprintOperations = Com.Zoho.Crm.API.Blueprint.BlueprintOperations; +using Currency = Com.Zoho.Crm.API.Blueprint.Currency; +using Escalation = Com.Zoho.Crm.API.Blueprint.Escalation; +using Field = Com.Zoho.Crm.API.Blueprint.Field; +using Layout = Com.Zoho.Crm.API.Blueprint.Layout; +using NextTransition = Com.Zoho.Crm.API.Blueprint.NextTransition; +using ProcessInfo = Com.Zoho.Crm.API.Blueprint.ProcessInfo; +using ResponseHandler = Com.Zoho.Crm.API.Blueprint.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.Blueprint.ResponseWrapper; +using Transition = Com.Zoho.Crm.API.Blueprint.Transition; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using External = Com.Zoho.Crm.API.Fields.External; +using Maps = Com.Zoho.Crm.API.Fields.Maps; +using Module = Com.Zoho.Crm.API.Blueprint.Module; +using MultiModuleLookup = Com.Zoho.Crm.API.Fields.MultiModuleLookup; +using PickListValue = Com.Zoho.Crm.API.Fields.PickListValue; +using MultiSelectLookup = Com.Zoho.Crm.API.Blueprint.MultiSelectLookup; +using ToolTip = Com.Zoho.Crm.API.Blueprint.ToolTip; +using Unique = Com.Zoho.Crm.API.Fields.Unique; +using ViewType = Com.Zoho.Crm.API.Blueprint.ViewType; +using Record = Com.Zoho.Crm.API.Record.Record; +using MinifiedUser = Com.Zoho.Crm.API.Users.MinifiedUser; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Blueprint +{ + public class GetBlueprint + { + public static void GetBlueprint_1(string moduleAPIName, string recordId) + { + BlueprintOperations bluePrintOperations = new BlueprintOperations(recordId, moduleAPIName); + APIResponse response = bluePrintOperations.GetBlueprint(); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (new List() { 204, 304 }.Contains(response.StatusCode)) + { + Console.WriteLine(response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper)responseHandler; + Com.Zoho.Crm.API.Blueprint.BluePrint bluePrint = responseWrapper.Blueprint; + ProcessInfo processInfo = bluePrint.ProcessInfo; + if (processInfo != null) + { + Console.WriteLine("ProcessInfo Field-ID: " + processInfo.FieldId); + Escalation escalation = processInfo.Escalation; + if (escalation != null) + { + Console.WriteLine("Escalation days: " + escalation.Days); + Console.WriteLine("Escalation status: " + escalation.Status); + } + Console.WriteLine("ProcessInfo isContinuous: " + processInfo.IsContinuous); + Console.WriteLine("ProcessInfo API Name: " + processInfo.APIName); + Console.WriteLine("ProcessInfo Continuous: " + processInfo.Continuous); + Console.WriteLine("ProcessInfo FieldLabel: " + processInfo.FieldLabel); + Console.WriteLine("ProcessInfo Name: " + processInfo.Name); + Console.WriteLine("ProcessInfo ColumnName: " + processInfo.ColumnName); + Console.WriteLine("ProcessInfo FieldValue: " + processInfo.FieldValue); + Console.WriteLine("ProcessInfo ID: " + processInfo.Id); + Console.WriteLine("ProcessInfo FieldName: " + processInfo.FieldName); + } + List transitions = bluePrint.Transitions; + foreach (Transition transition in transitions) + { + List nextTransitions = transition.NextTransitions; + foreach (NextTransition nextTransition in nextTransitions) + { + Console.WriteLine("NextTransition ID: " + nextTransition.Id); + Console.WriteLine("NextTransition criteria_matched: " + nextTransition.CriteriaMatched); + Console.WriteLine("NextTransition Name: " + nextTransition.Name); + Console.WriteLine("NextTransition type: " + nextTransition.Type); + } + Transition parentTransition = transition.ParentTransition; + if (parentTransition != null) + { + Console.WriteLine("Parenttransition ID: " + parentTransition.Id); + } + Com.Zoho.Crm.API.Record.Record data = transition.Data; + Console.WriteLine("Record ID: " + data.Id); + MinifiedUser createdBy = data.CreatedBy; + if (createdBy != null) + { + Console.WriteLine("Record Created By User-ID: " + createdBy.Id); + Console.WriteLine("Record Created By User-Name: " + createdBy.Name); + } + if (data.CreatedTime != null) + { + Console.WriteLine("Record Created Time: " + data.CreatedTime); + } + if (data.ModifiedTime != null) + { + Console.WriteLine("Record Modified Time: " + data.ModifiedTime); + } + MinifiedUser modifiedBy = data.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine("Record Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine("Record Modified By user-Name: " + modifiedBy.Name); + } + foreach (KeyValuePair entry in data.GetKeyValues()) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Transition NextFieldValue: " + transition.NextFieldValue); + Console.WriteLine("Transition Name: " + transition.Name); + Console.WriteLine("Transition CriteriaMatched: " + transition.CriteriaMatched); + Console.WriteLine("Transition ID: " + transition.Id); + Console.WriteLine("Transition Fields: "); + List fields = transition.Fields; + foreach (Field fieldHandler in fields) + { + Field field = (Field)fieldHandler; + if (field.SystemMandatory != null) + { + Console.WriteLine("Field is SystemMandatory: " + field.SystemMandatory); + } + Console.WriteLine("Field is Private" + field.Private); + Console.WriteLine("Transition Fields Webhook: " + field.Webhook); + Console.WriteLine("Transition Fields JsonType: " + field.JsonType); + Console.WriteLine("Transition Fields DisplayLabel: " + field.DisplayLabel); + Console.WriteLine("Transition Fields UiType: " + field.UiType); + Console.WriteLine("Transition Fields ValidationRule: " + field.ValidationRule); + Console.WriteLine("Transition Fields DataType: " + field.DataType); + Console.WriteLine("Transition Fields Type: " + field.Type); + Console.WriteLine("Transition Fields ColumnName: " + field.ColumnName); + Console.WriteLine("Transition Fields PersonalityName: " + field.PersonalityName); + Console.WriteLine("Transition Fields ID: " + field.Id); + Console.WriteLine("Transition Fields TransitionSequence: " + field.TransitionSequence); + if (field.Mandatory != null) + { + Console.WriteLine("Transition Fields Mandatory: " + field.Mandatory); + } + Layout layout = field.Layouts; + if (layout != null) + { + Console.WriteLine("Transition Fields Layout ID: " + layout.Id); + Console.WriteLine("Transition Fields Layout Name: " + layout.Name); + } + Console.WriteLine("Field PickListValuesSortedLexically: " + field.PickListValuesSortedLexically); + Console.WriteLine("Field Sortable: " + field.Sortable); + Console.WriteLine("Field TransitionSequence: " + field.TransitionSequence); + External external = field.External; + if (external != null) + { + Console.WriteLine("Field External Show: " + external.Show); + Console.WriteLine("Field External Type: " + external.Type); + Console.WriteLine("Field External AllowMultipleConfig: " + external.AllowMultipleConfig); + } + Unique unique = field.Unique; + if (unique != null) + { + Console.WriteLine("Field Unique Casesensitive : " + unique.Casesensitive); + } + if (field.HistoryTracking != null) + { + Console.WriteLine("Field HistoryTracking: " + field.HistoryTracking); + } + Console.WriteLine("Field DataType: " + field.DataType); + Console.WriteLine("Transition Fields APIName: " + field.APIName); + Console.WriteLine("Transition Fields Content: " + field.Content); + if (field.SystemMandatory != null) + { + Console.WriteLine("Transition Fields SystemMandatory: " + field.SystemMandatory); + } + Console.WriteLine("Transition Fields FieldLabel: " + field.FieldLabel); + MultiModuleLookup multiModuleLookup = field.MultiModuleLookup; + if (multiModuleLookup != null) + { + Console.WriteLine("Field MultiModuleLookup APIName: " + multiModuleLookup.APIName); + Console.WriteLine("Field MultiModuleLookup DisplayLabel: " + multiModuleLookup.DisplayLabel); + if(multiModuleLookup.Modules != null) + { + foreach (Com.Zoho.Crm.API.Modules.MinifiedModule module in multiModuleLookup.Modules) + { + Console.WriteLine("Field MultiModuleLookup Module ID: " + module.Id); + Console.WriteLine("Field MultiModuleLookup Module APIName: " + module.APIName); + } + } + } + Currency currency = field.Currency; + if (currency != null) + { + Console.WriteLine("Field Currency RoundingOption: " + currency.RoundingOption); + if (currency.Precision != null) + { + Console.WriteLine("Field Currency Precision: " + currency.Precision); + } + } + ToolTip toolTip = field.Tooltip; + if (toolTip != null) + { + Console.WriteLine("Transition Fields Tooltip Name: " + toolTip.Name); + Console.WriteLine("Transition Fields Tooltip Value: " + toolTip.Value); + } + Console.WriteLine("Transition Fields CreatedSource: " + field.CreatedSource); + if (field.FieldReadOnly != null) + { + Console.WriteLine("Transition Fields FieldReadOnly: " + field.FieldReadOnly); + } + if (field.DisplayType != null) + { + Console.WriteLine("Transition Fields DisplayType: " + field.DisplayType); + } + if (field.ReadOnly != null) + { + Console.WriteLine("Transition Fields ReadOnly: " + field.ReadOnly); + } + Console.WriteLine("Transition Fields AssociationDetails: " + field.AssociationDetails); + if (field.QuickSequenceNumber != null) + { + Console.WriteLine("Transition Fields QuickSequenceNumber: " + field.QuickSequenceNumber); + } + if (field.CustomField != null) + { + Console.WriteLine("Transition Fields CustomField: " + field.CustomField); + } + Module lookup = field.Lookup; + if (lookup != null) + { + Console.WriteLine("Field ModuleLookup DisplayLabel: " + lookup.DisplayLabel); + Console.WriteLine("Field ModuleLookup APIName: " + lookup.APIName); + Console.WriteLine("Field ModuleLookup Module: " + lookup.Module_1); + if (lookup.Id != null) + { + Console.WriteLine("Field ModuleLookup ID: " + lookup.Id); + } + } + Console.WriteLine("Field Filterable: " + field.Filterable); + if (field.Visible != null) + { + Console.WriteLine("Transition Fields Visible: " + field.Visible); + } + List profiles = field.Profiles; + if (profiles != null) + { + foreach (Com.Zoho.Crm.API.Blueprint.Profile profile in profiles) + { + Console.WriteLine("Field Profile PermissionType: " + profile.PermissionType); + Console.WriteLine("Field Profile Name: " + profile.Name); + Console.WriteLine("Field Profile Id: " + profile.Id); + } + } + if (field.Formula != null) + { + if (field.Formula.Expression != null) + { + Console.WriteLine("Field Formula Expression : " + field.Formula.Expression); + } + } + if (field.DecimalPlace != null) + { + Console.WriteLine("Field DecimalPlace: " + field.DecimalPlace); + } + if (field.Length != null) + { + Console.WriteLine("Transition Fields Length: " + field.Length); + } + Console.WriteLine("Transition Fields DecimalPlace: " + field.DecimalPlace); + ViewType viewType = field.ViewType; + if (viewType != null) + { + Console.WriteLine("Transition Fields ViewType View: " + viewType.View); + Console.WriteLine("Transition Fields ViewType Edit: " + viewType.Edit); + Console.WriteLine("Transition Fields ViewType Create: " + viewType.Create); + Console.WriteLine("Transition Fields ViewType QuickCreate: " + viewType.QuickCreate); + } + List pickListValues = field.PickListValues; + if (pickListValues != null) + { + foreach (PickListValue pickListValue in pickListValues) + { + PrintPickListValue(pickListValue); + } + } + MultiSelectLookup multiSelectLookup = field.Multiselectlookup; + if (multiSelectLookup != null) + { + Console.WriteLine("Transition Fields MultiSelectLookup DisplayLabel: " + multiSelectLookup.DisplayLabel); + Console.WriteLine("Transition Fields MultiSelectLookup LinkingModule: " + multiSelectLookup.LinkingModule); + Console.WriteLine("Transition Fields MultiSelectLookup LookupApiname: " + multiSelectLookup.LookupApiname); + Console.WriteLine("Transition Fields MultiSelectLookup APIName: " + multiSelectLookup.APIName); + Console.WriteLine("Transition Fields MultiSelectLookup ConnectedlookupApiname: " + multiSelectLookup.ConnectedlookupApiname); + Console.WriteLine("Transition Fields MultiSelectLookup ID: " + multiSelectLookup.Id); + } + Com.Zoho.Crm.API.Blueprint.AutoNumber autoNumber = field.AutoNumber; + if (autoNumber != null) + { + Console.WriteLine("Transition Fields AutoNumber Prefix: " + autoNumber.Prefix); + Console.WriteLine("Transition Fields AutoNumber Suffix: " + autoNumber.Suffix); + if (autoNumber.StartNumber != null) + { + Console.WriteLine("Transition Fields Auto StartNumber: " + autoNumber.StartNumber); + } + } + Console.WriteLine("Transition Fields ConvertMapping: "); + if (field.ConvertMapping != null) + { + foreach (KeyValuePair entry in field.ConvertMapping) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + } + } + Console.WriteLine("Transition CriteriaMessage: " + transition.CriteriaMessage); + Console.WriteLine("Transition PercentPartialSave: " + transition.PercentPartialSave); + Console.WriteLine("Transition ExecutionTime: " + transition.ExecutionTime); + Console.WriteLine("Transition Type: " + transition.Type); + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException)responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void PrintPickListValue(PickListValue pickListValue) + { + Console.WriteLine(" Fields PickListValue DisplayValue: " + pickListValue.DisplayValue); + Console.WriteLine(" Fields PickListValue SequenceNumber: " + pickListValue.SequenceNumber); + Console.WriteLine(" Fields PickListValue ExpectedDataType: " + pickListValue.ExpectedDataType); + Console.WriteLine(" Fields PickListValue ActualValue: " + pickListValue.ActualValue); + Console.WriteLine(" Fields PickListValue SysRefName: " + pickListValue.SysRefName); + Console.WriteLine(" Fields PickListValue Type: " + pickListValue.Type); + Console.WriteLine(" Fields PickListValue Id: " + pickListValue.Id); + foreach (Maps map in pickListValue.Maps) + { + Console.WriteLine(map); + List pickListValues = map.PickListValues; + if (pickListValues != null) + { + foreach (PickListValue plv in pickListValues) + { + PrintPickListValue(plv); + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + string recordId = "3473121042"; + GetBlueprint_1(moduleAPIName, recordId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Blueprint/UpdateBlueprint.cs b/versions/3.0.0/Samples/Blueprint/UpdateBlueprint.cs new file mode 100644 index 0000000..6ff9dc6 --- /dev/null +++ b/versions/3.0.0/Samples/Blueprint/UpdateBlueprint.cs @@ -0,0 +1,174 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using APIException = Com.Zoho.Crm.API.Blueprint.APIException; +using ActionHandler = Com.Zoho.Crm.API.Blueprint.ActionHandler; +using BlueprintOperations = Com.Zoho.Crm.API.Blueprint.BlueprintOperations; +using BodyWrapper = Com.Zoho.Crm.API.Blueprint.BodyWrapper; +using Escalation = Com.Zoho.Crm.API.Blueprint.Escalation; +using NextTransition = Com.Zoho.Crm.API.Blueprint.NextTransition; +using ProcessInfo = Com.Zoho.Crm.API.Blueprint.ProcessInfo; +using SuccessResponse = Com.Zoho.Crm.API.Blueprint.SuccessResponse; +using Transition = Com.Zoho.Crm.API.Blueprint.Transition; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Blueprint +{ + public class UpdateBlueprint + { + public static void UpdateBlueprint_1(string moduleAPIName, string recordId, string transitionId) + { + BlueprintOperations bluePrintOperations = new BlueprintOperations(recordId, moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List bluePrintList = new List(); + Com.Zoho.Crm.API.Blueprint.BluePrint bluePrint = new Com.Zoho.Crm.API.Blueprint.BluePrint(); + bluePrint.TransitionId = transitionId; + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + Dictionary lookup = new Dictionary(); + lookup.Add("Phone", "8972937"); + lookup.Add("id", "8972937"); + data.AddKeyValue("Phone", "892937"); + data.AddKeyValue("Notes", "Updated via blueprint"); + Dictionary attachments = new Dictionary(); + List fileIds = new List(); + fileIds.Add("blojtd2d13b5f044e4041a3315793fb21ef"); + attachments.Add("file_id", fileIds); + attachments.Add("link_url", "ww.zoho.com"); + // data.AddKeyValue("Attachments", attachments); + List> listings = new List>(); + Dictionary interested_listings = new Dictionary(); + interested_listings.Add("id", 36521978005L); + listings.Add(interested_listings); + // data.AddKeyValue("Listings", listings); + List> multiuser = new List>(); + Dictionary multi_user = new Dictionary(); + multi_user.Add("name", "givenname"); + multi_user.Add("id", 36527186017L); + multiuser.Add(multi_user); + // data.AddKeyValue("Multi_user", multiuser); + ProcessInfo processinfo = new ProcessInfo(); + processinfo.APIName = "apiname"; + processinfo.ColumnName = "columnname"; + processinfo.Continuous = false; + processinfo.FieldId = 323243l; + processinfo.FieldLabel = "fieldlabel"; + processinfo.FieldName = "field_name"; + processinfo.Id = "32900132223"; + processinfo.IsContinuous = false; + processinfo.Name = "name"; + Escalation escalation = new Escalation(); + escalation.Days = 1; + escalation.Status = "overdue"; + processinfo.Escalation = escalation; + // bluePrint.ProcessInfo = processinfo; + List transitions = new List(); + Transition transition = new Transition(); + transition.Type = "manual"; + List nextTransitions = new List(); + NextTransition nexttransition = new NextTransition(); + nexttransition.Id = "36523973921103"; + nexttransition.Name = "call later"; + nexttransition.Type = "manual"; + nexttransition.CriteriaMatched = false; + nextTransitions.Add(nexttransition); + transition.NextTransitions = nextTransitions; + transitions.Add(transition); + // bluePrint.Transitions = transitions; + List> checkLists = new List>(); + Dictionary checkListItem = new Dictionary(); + checkListItem.Add("list 1", true); + checkLists.Add(checkListItem); + checkListItem = new Dictionary(); + checkListItem.Add("list 2", true); + checkLists.Add(checkListItem); + checkListItem = new Dictionary(); + checkListItem.Add("list 3", true); + checkLists.Add(checkListItem); + // data.AddKeyValue("CheckLists", checkLists); + Dictionary tasks = new Dictionary(); + tasks.Add("Subject", "Event"); + // data.AddKeyValue("Tasks", tasks); + bluePrint.Data = data; + bluePrintList.Add(bluePrint); + bodyWrapper.Blueprint = bluePrintList; + APIResponse response = bluePrintOperations.UpdateBlueprint(bodyWrapper); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionResponse = response.Object; + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse)actionResponse; + Console.WriteLine("Status: " + successResponse.Status.Value); + Console.WriteLine("Code: " + successResponse.Code.Value); + Console.WriteLine("Details: "); + if (successResponse.Details != null) + { + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + } + Console.WriteLine("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException)actionResponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + string recordId = "34770611002"; + string transitionId = "343122189321"; + UpdateBlueprint_1(moduleAPIName, recordId, transitionId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/CadencesExecution/EnrolCadences.cs b/versions/3.0.0/Samples/CadencesExecution/EnrolCadences.cs new file mode 100644 index 0000000..a596fe1 --- /dev/null +++ b/versions/3.0.0/Samples/CadencesExecution/EnrolCadences.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.API.Authenticator; +using Com.Zoho.Crm.API.CadencesExecution; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Samples.CadencesExecution +{ + public class EnrolCadences + { + public static void EnrolCadences_1(string ModuleAPIName) + { + CadencesExecutionOperations cadencesExecutionOperations = new CadencesExecutionOperations(); + BodyWrapper request = new BodyWrapper(); + List cadencesIds = new List(); + cadencesIds.Add("3475001"); + request.CadencesIds = cadencesIds; + List ids = new List(); + ids.Add("34774115001"); + request.Ids = ids; + APIResponse response = cadencesExecutionOperations.EnrolCadences(ModuleAPIName, request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper)actionHandler; + List actionresponses = actionWrapper.Data; + foreach (ActionResponse actionresponse in actionresponses) + { + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse)actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException)actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + System.Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string ModuleAPIName = "Leads"; + EnrolCadences_1(ModuleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} diff --git a/versions/3.0.0/Samples/CadencesExecution/UnenrolCadences.cs b/versions/3.0.0/Samples/CadencesExecution/UnenrolCadences.cs new file mode 100644 index 0000000..f39e856 --- /dev/null +++ b/versions/3.0.0/Samples/CadencesExecution/UnenrolCadences.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.API.Authenticator; +using Com.Zoho.Crm.API.CadencesExecution; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Samples.CadencesExecution +{ + public class UnenrolCadences + { + public static void UnenrolCadences_1(string ModuleAPIName) + { + CadencesExecutionOperations cadencesExecutionOperations = new CadencesExecutionOperations(); + BodyWrapper request = new BodyWrapper(); + List cadencesIds = new List(); + cadencesIds.Add("3477085001"); + request.CadencesIds = cadencesIds; + List ids = new List(); + ids.Add("3477065001"); + request.Ids = ids; + APIResponse response = cadencesExecutionOperations.UnenrolCadences(ModuleAPIName, request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper)actionHandler; + List actionresponses = actionWrapper.Data; + foreach (ActionResponse actionresponse in actionresponses) + { + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse)actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException)actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + System.Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string ModuleAPIName = "Leads"; + UnenrolCadences_1(ModuleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} diff --git a/versions/3.0.0/Samples/DuplicateCheckPreference1/CreateDuplicateCheckPreference.cs b/versions/3.0.0/Samples/DuplicateCheckPreference1/CreateDuplicateCheckPreference.cs new file mode 100644 index 0000000..eb018b2 --- /dev/null +++ b/versions/3.0.0/Samples/DuplicateCheckPreference1/CreateDuplicateCheckPreference.cs @@ -0,0 +1,134 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.DuplicateCheckPreference; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; +using System.Reflection; +using Newtonsoft.Json; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; + +namespace Samples.DuplicateCheckPreference1 +{ + public class CreateDuplicateCheckPreference + { + public static void CreateDuplicateCheckPreference_1(string moduleAPIName) + { + DuplicateCheckPreferenceOperations duplicateCheckPreferenceOperations = new DuplicateCheckPreferenceOperations(moduleAPIName); + BodyWrapper request = new BodyWrapper(); + DuplicateCheckPreference duplicateCheckPreference = new DuplicateCheckPreference(); + duplicateCheckPreference.Type = new Choice("mapped_module_records"); + + List typeConfigurations = new List(); + TypeConfiguration typeConfiguration = new TypeConfiguration(); + MappedModule mappedModule = new MappedModule(); + mappedModule.Id = "34770612175"; + mappedModule.APIName = "Leads"; + typeConfiguration.MappedModule = mappedModule; + List fieldMappings = new List(); + FieldMappings fieldMapping = new FieldMappings(); + CurrentField currentField = new CurrentField(); + currentField.Id = "34770616570001"; + currentField.APIName = "Email_1"; + fieldMapping.CurrentField = currentField; + + MappedField mappedField = new MappedField(); + mappedField.Id = "347706123537018"; + mappedField.APIName = "Email_2"; + fieldMapping.MappedField = mappedField; + + fieldMappings.Add(fieldMapping); + typeConfiguration.FieldMappings = fieldMappings; + typeConfigurations.Add(typeConfiguration); + duplicateCheckPreference.TypeConfigurations = typeConfigurations; + request.DuplicateCheckPreference = duplicateCheckPreference; + APIResponse response = duplicateCheckPreferenceOperations.CreateDuplicateCheckPreference(request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + ActionResponse actionresponse = actionWrapper.DuplicateCheckPreference; + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse) actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException) actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Contacts"; + CreateDuplicateCheckPreference_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/DuplicateCheckPreference1/DeleteDuplicateCheckPreference.cs b/versions/3.0.0/Samples/DuplicateCheckPreference1/DeleteDuplicateCheckPreference.cs new file mode 100644 index 0000000..e397ea6 --- /dev/null +++ b/versions/3.0.0/Samples/DuplicateCheckPreference1/DeleteDuplicateCheckPreference.cs @@ -0,0 +1,107 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.DuplicateCheckPreference; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; +using System.Reflection; +using Newtonsoft.Json; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; + +namespace Samples.DuplicateCheckPreference1 +{ + public class DeleteDuplicateCheckPreference + { + public static void DeleteDuplicateCheckPreference_1(string moduleAPIName) + { + DuplicateCheckPreferenceOperations duplicateCheckPreferenceOperations = new DuplicateCheckPreferenceOperations(moduleAPIName); + APIResponse response = duplicateCheckPreferenceOperations.DeleteDuplicateCheckPreference(); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper)actionHandler; + ActionResponse actionresponse = actionWrapper.DuplicateCheckPreference; + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse)actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException)actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Contacts"; + DeleteDuplicateCheckPreference_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/DuplicateCheckPreference1/GetDuplicateCheckPreference.cs b/versions/3.0.0/Samples/DuplicateCheckPreference1/GetDuplicateCheckPreference.cs new file mode 100644 index 0000000..56aa6d5 --- /dev/null +++ b/versions/3.0.0/Samples/DuplicateCheckPreference1/GetDuplicateCheckPreference.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.API.Authenticator; +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.Crm.API.DuplicateCheckPreference; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Samples.DuplicateCheckPreference1 +{ + public class GetDuplicateCheckPreference + { + public static void GetDuplicateCheckPreference_1(string moduleAPIName) + { + DuplicateCheckPreferenceOperations duplicateCheckPreferenceOperations = new DuplicateCheckPreferenceOperations(moduleAPIName); + APIResponse response = duplicateCheckPreferenceOperations.GetDuplicateCheckPreference(); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.StatusCode == 204) + { + Console.WriteLine("No Content"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper)responseHandler; + DuplicateCheckPreference duplicateCheckPreference = responseWrapper.DuplicateCheckPreference; + Console.WriteLine("DuplicateCheckPreference Type : " + duplicateCheckPreference.Type.Value); + List typeConfigurations = duplicateCheckPreference.TypeConfigurations; + if (typeConfigurations != null) + { + foreach (TypeConfiguration typeConfiguration in typeConfigurations) + { + MappedModule mappedModule = typeConfiguration.MappedModule; + if (mappedModule != null) + { + Console.WriteLine("DuplicateCheckPreference TypeConfiguration MappedModule Id : " + mappedModule.Id); + Console.WriteLine("DuplicateCheckPreference TypeConfiguration MappedModule Name : " + mappedModule.Name); + Console.WriteLine("DuplicateCheckPreference TypeConfiguration MappedModule APIName : " + mappedModule.APIName); + } + List fieldMappings = typeConfiguration.FieldMappings; + if (fieldMappings != null) + { + foreach (FieldMappings fieldMapping in fieldMappings) + { + CurrentField currentField = fieldMapping.CurrentField; + if (currentField != null) + { + Console.WriteLine("DuplicateCheckPreference TypeConfiguration FieldMappings CurrentField Id : " + currentField.Id); + Console.WriteLine("DuplicateCheckPreference TypeConfiguration FieldMappings CurrentField Name : " + currentField.Name); + Console.WriteLine("DuplicateCheckPreference TypeConfiguration FieldMappings CurrentField APIName : " + currentField.APIName); + } + MappedField mappedField = fieldMapping.MappedField; + if (mappedField != null) + { + Console.WriteLine("DuplicateCheckPreference TypeConfiguration FieldMappings MappedField Id : " + mappedField.Id); + Console.WriteLine("DuplicateCheckPreference TypeConfiguration FieldMappings MappedField Name : " + mappedField.Name); + Console.WriteLine("DuplicateCheckPreference TypeConfiguration FieldMappings MappedField APIName : " + mappedField.APIName); + } + } + } + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException)responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else if (response.StatusCode != 204) + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Contacts"; + GetDuplicateCheckPreference_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/DuplicateCheckPreference1/UpdateDuplicateCheckPreference.cs b/versions/3.0.0/Samples/DuplicateCheckPreference1/UpdateDuplicateCheckPreference.cs new file mode 100644 index 0000000..19f7362 --- /dev/null +++ b/versions/3.0.0/Samples/DuplicateCheckPreference1/UpdateDuplicateCheckPreference.cs @@ -0,0 +1,134 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.DuplicateCheckPreference; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; +using System.Reflection; +using Newtonsoft.Json; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; + +namespace Samples.DuplicateCheckPreference1 +{ + public class UpdateDuplicateCheckPreference + { + public static void UpdateDuplicateCheckPreference_1(string moduleAPIName) + { + DuplicateCheckPreferenceOperations duplicateCheckPreferenceOperations = new DuplicateCheckPreferenceOperations(moduleAPIName); + BodyWrapper request = new BodyWrapper(); + DuplicateCheckPreference duplicateCheckPreference = new DuplicateCheckPreference(); + duplicateCheckPreference.Type = new Choice("mapped_module_records"); + + List typeConfigurations = new List(); + TypeConfiguration typeConfiguration = new TypeConfiguration(); + MappedModule mappedModule = new MappedModule(); + mappedModule.Id = "34770612175"; + mappedModule.APIName = "Leads"; + typeConfiguration.MappedModule = mappedModule; + List fieldMappings = new List(); + FieldMappings fieldMapping = new FieldMappings(); + CurrentField currentField = new CurrentField(); + currentField.Id = "347706106570001"; + currentField.APIName = "Email_1"; + fieldMapping.CurrentField = currentField; + + MappedField mappedField = new MappedField(); + mappedField.Id = "347706123537018"; + mappedField.APIName = "Email_2"; + fieldMapping.MappedField = mappedField; + + fieldMappings.Add(fieldMapping); + typeConfiguration.FieldMappings = fieldMappings; + typeConfigurations.Add(typeConfiguration); + duplicateCheckPreference.TypeConfigurations = typeConfigurations; + request.DuplicateCheckPreference = duplicateCheckPreference; + APIResponse response = duplicateCheckPreferenceOperations.UpdateDuplicateCheckPreference(request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper)actionHandler; + ActionResponse actionresponse = actionWrapper.DuplicateCheckPreference; + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse)actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException)actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Contacts"; + UpdateDuplicateCheckPreference_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/Layouts/GetLayout.cs b/versions/3.0.0/Samples/Layouts/GetLayout.cs new file mode 100644 index 0000000..c384edc --- /dev/null +++ b/versions/3.0.0/Samples/Layouts/GetLayout.cs @@ -0,0 +1,495 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using AssociationDetails = Com.Zoho.Crm.API.Fields.AssociationDetails; +using AutoNumber = Com.Zoho.Crm.API.Fields.AutoNumber; +using Crypt = Com.Zoho.Crm.API.Fields.Crypt; +using Currency = Com.Zoho.Crm.API.Fields.Currency; +using Formula = Com.Zoho.Crm.API.Fields.Formula; +using HistoryTracking = Com.Zoho.Crm.API.Fields.HistoryTracking; +using HistoryTrackingModule = Com.Zoho.Crm.API.Fields.HistoryTrackingModule; +using Lookup = Com.Zoho.Crm.API.Fields.Lookup; +using Maps = Com.Zoho.Crm.API.Fields.Maps; +using Multiselectlookup = Com.Zoho.Crm.API.Fields.Multiselectlookup; +using PickListValue = Com.Zoho.Crm.API.Fields.PickListValue; +using Private = Com.Zoho.Crm.API.Fields.Private; +using Unique = Com.Zoho.Crm.API.Fields.Unique; +using ViewType = Com.Zoho.Crm.API.Fields.ViewType; +using APIException = Com.Zoho.Crm.API.Layouts.APIException; +using ConvertMapping = Com.Zoho.Crm.API.Layouts.ConvertMapping; +using DealLayoutMapping = Com.Zoho.Crm.API.Layouts.DealLayoutMapping; +using DefaultView = Com.Zoho.Crm.API.Layouts.DefaultView; +using LayoutsOperations = Com.Zoho.Crm.API.Layouts.LayoutsOperations; +using GetLayoutsParam = Com.Zoho.Crm.API.Layouts.LayoutsOperations.GetLayoutsParam; +using MinifiedLayout = Com.Zoho.Crm.API.Layouts.MinifiedLayout; +using Profiles = Com.Zoho.Crm.API.Layouts.Profiles; +using Properties = Com.Zoho.Crm.API.Layouts.Properties; +using ResponseHandler = Com.Zoho.Crm.API.Layouts.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.Layouts.ResponseWrapper; +using Sections = Com.Zoho.Crm.API.Layouts.Sections; +using SectionField = Com.Zoho.Crm.API.Layouts.SectionField; +using Tooltip = Com.Zoho.Crm.API.Layouts.Tooltip; +using MinifiedModule = Com.Zoho.Crm.API.Modules.MinifiedModule; +using MinifiedUser = Com.Zoho.Crm.API.Users.MinifiedUser; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Layouts +{ + public class GetLayout + { + public static void GetLayout_1(string moduleAPIName, long layoutId) + { + LayoutsOperations layoutsOperations = new LayoutsOperations(); + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(GetLayoutsParam.MODULE, moduleAPIName); + APIResponse response = layoutsOperations.GetLayout(layoutId, paramInstance); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (new List() { 204, 304 }.Contains(response.StatusCode)) + { + Console.WriteLine(response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper)responseHandler; + List layouts = responseWrapper.Layouts; + foreach (Com.Zoho.Crm.API.Layouts.Layouts layout in layouts) + { + if (layout.CreatedTime != null) + { + Console.WriteLine("Layout CreatedTime: " + layout.CreatedTime); + } + if (layout.ConvertMapping != null) + { + ConvertMapping convertMapping = layout.ConvertMapping; + MinifiedLayout accounts = convertMapping.Accounts; + MinifiedLayout contacts = convertMapping.Contacts; + DealLayoutMapping deals = convertMapping.Deals; + } + Console.WriteLine("Layout Visible: " + layout.Visible); + MinifiedUser createdFor = layout.CreatedFor; + if (createdFor != null) + { + Console.WriteLine("Layout CreatedFor User-Name: " + createdFor.Name); + Console.WriteLine("Layout CreatedFor User-ID: " + createdFor.Id); + Console.WriteLine("Layout CreatedFor User-Email: " + createdFor.Email); + } + List profiles = layout.Profiles; + if (profiles != null) + { + foreach (Profiles profile in profiles) + { + Console.WriteLine("Layout Profile Default: " + profile.Default); + Console.WriteLine("Layout Profile Name: " + profile.Name); + Console.WriteLine("Layout Profile ID: " + profile.Id); + DefaultView defaultView = profile.Defaultview; + if (defaultView != null) + { + Console.WriteLine("Layout Profile DefaultView Name: " + defaultView.Name); + Console.WriteLine("Layout Profile DefaultView ID: " + defaultView.Id); + Console.WriteLine("Layout Profile DefaultView Type: " + defaultView.Type); + } + } + } + MinifiedUser createdBy = layout.CreatedBy; + if (createdBy != null) + { + Console.WriteLine("Layout CreatedBy User-Name: " + createdBy.Name); + Console.WriteLine("Layout CreatedBy User-ID: " + createdBy.Id); + Console.WriteLine("Layout CreatedBy User-Email: " + createdBy.Email); + } + List sections = layout.Sections; + if (sections != null) + { + foreach (Sections section in sections) + { + Console.WriteLine("Layout Section DisplayLabel: " + section.DisplayLabel); + Console.WriteLine("Layout Section SequenceNumber: " + section.SequenceNumber); + Console.WriteLine("Layout Section IsSubformSection: " + section.Issubformsection); + Console.WriteLine("Layout Section TabTraversal: " + section.TabTraversal); + Console.WriteLine("Layout Section APIName: " + section.APIName); + Console.WriteLine("Layout Section ColumnCount: " + section.ColumnCount); + Console.WriteLine("Layout Section Name: " + section.Name); + Console.WriteLine("Layout Section GeneratedType: " + section.GeneratedType); + Console.WriteLine("Layout Section Type: " + section.Type); + List fields = section.Fields; + if (fields != null) + { + foreach (Com.Zoho.Crm.API.Fields.Fields field in fields) + { + PrintField(field); + } + } + Properties properties = section.Properties; + if (properties != null) + { + Console.WriteLine("Layout Section Properties ReorderRows: " + properties.ReorderRows); + Tooltip tooltip = properties.Tooltip; + if (tooltip != null) + { + Console.WriteLine("Layout Section Properties ToolTip Name: " + tooltip.Name); + Console.WriteLine("Layout Section Properties ToolTip Value: " + tooltip.Value); + } + Console.WriteLine("Layout Section Properties MaximumRows: " + properties.MaximumRows); + } + } + } + Console.WriteLine("Layout buisness card: " + layout.ShowBusinessCard); + if (layout.ModifiedTime != null) + { + Console.WriteLine("Layout ModifiedTime: " + layout.ModifiedTime); + } + Console.WriteLine("Layout Name: " + layout.Name); + MinifiedUser modifiedBy = layout.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine("Layout ModifiedBy User-Name: " + modifiedBy.Name); + Console.WriteLine("Layout ModifiedBy User-ID: " + modifiedBy.Id); + Console.WriteLine("Layout ModifiedBy User-Email: " + modifiedBy.Email); + } + Console.WriteLine("Layout ID: " + layout.Id); + Console.WriteLine("Layout Status: " + layout.Status); + Console.WriteLine("Layout DisplayType : " + layout.DisplayType); + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException)responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + private static void PrintField(Com.Zoho.Crm.API.Fields.Fields field) + { + Console.WriteLine("Field SystemMandatory: " + field.SystemMandatory); + Console.WriteLine("Field Webhook: " + field.Webhook); + Console.WriteLine("Field JsonType: " + field.JsonType); + Private privateInfo = field.Private; + if (privateInfo != null) + { + Console.WriteLine("Private Details"); + Console.WriteLine("Field Private Type: " + privateInfo.Type); + Console.WriteLine("Field Private Export: " + privateInfo.Export); + Console.WriteLine("Field Private Restricted: " + privateInfo.Restricted); + } + Crypt crypt = field.Crypt; + if (crypt != null) + { + Console.WriteLine("Field Crypt Mode: " + crypt.Mode); + Console.WriteLine("Field Crypt Column: " + crypt.Column); + Console.WriteLine("Field Crypt Table: " + crypt.Table); + Console.WriteLine("Field Crypt Status: " + crypt.Status); + List encFldIds = crypt.Encfldids; + if (encFldIds != null) + { + Console.WriteLine("EncFldIds : "); + foreach (string encFldId in encFldIds) + { + Console.WriteLine(encFldId); + } + } + Console.WriteLine("Field Crypt Notify: " + crypt.Notify); + } + Console.WriteLine("Field FieldLabel: " + field.FieldLabel); + Com.Zoho.Crm.API.Fields.Tooltip tooltip = field.Tooltip; + if (tooltip != null) + { + Console.WriteLine("Field ToolTip Name: " + tooltip.Name); + Console.WriteLine("Field ToolTip Value: " + tooltip.Value); + } + Console.WriteLine("Field CreatedSource: " + field.CreatedSource); + Console.WriteLine("Field FieldReadOnly: " + field.FieldReadOnly); + Console.WriteLine("Field DisplayLabel: " + field.DisplayLabel); + Console.WriteLine("Field ReadOnly: " + field.ReadOnly); + AssociationDetails associationDetails = field.AssociationDetails; + if (associationDetails != null) + { + MinifiedModule lookupField = associationDetails.LookupField; + if (lookupField != null) + { + Console.WriteLine("Field AssociationDetails LookupField ID: " + lookupField.Id); + Console.WriteLine("Field AssociationDetails LookupField Name: " + lookupField.APIName); + } + MinifiedModule relatedField = associationDetails.RelatedField; + if (relatedField != null) + { + Console.WriteLine("Field AssociationDetails RelatedField ID: " + relatedField.Id); + Console.WriteLine("Field AssociationDetails RelatedField Name: " + relatedField.APIName); + } + } + Console.WriteLine("Field Filterable: " + field.Filterable); + if (field.ConvertMapping != null) + { + if (field.ConvertMapping != null) + { + Com.Zoho.Crm.API.Fields.ConvertMapping convertMapping = field.ConvertMapping; + Console.WriteLine(convertMapping.Accounts); + Console.WriteLine(convertMapping.Contacts); + Console.WriteLine(convertMapping.Deals); + } + } + if (field.HistoryTracking != null) + { + HistoryTracking historytracking = field.HistoryTracking; + HistoryTrackingModule module = historytracking.Module; + if (module != null) + { + Com.Zoho.Crm.API.Layouts.Layouts moduleLayout = module.Layout; + if (moduleLayout != null) + { + Console.WriteLine("Module layout id" + moduleLayout.Id); + } + Console.WriteLine("Module layout display label" + module.DisplayLabel); + Console.WriteLine("Module layout api name" + module.APIName); + Console.WriteLine("Module layout module" + module.Id); + Console.WriteLine("Module layout id" + module.Module); + Console.WriteLine("Module layout module name" + module.ModuleName); + } + MinifiedModule durationConfigured = historytracking.DurationConfiguredField; + if (durationConfigured != null) + { + Console.WriteLine("historytracking duration configured field" + durationConfigured.Id); + } + } + Console.WriteLine("Field BusinesscardSupported: " + field.BusinesscardSupported); + Currency currency = field.Currency; + if (currency != null) + { + Console.WriteLine("Field Currency RoundingOption: " + currency.RoundingOption); + if (currency.Precision != null) + { + Console.WriteLine("Field Currency Precision: " + currency.Precision); + } + } + Console.WriteLine("Field ID: " + field.Id); + if (field.CustomField != null) + { + Console.WriteLine("Field CustomField: " + field.CustomField); + } + Lookup lookup = field.Lookup; + if (lookup != null) + { + Console.WriteLine("Field ModuleLookup DisplayLabel: " + lookup.DisplayLabel); + Console.WriteLine("Field ModuleLookup APIName: " + lookup.APIName); + Console.WriteLine("Field ModuleLookup Module: " + lookup.Module); + if (lookup.Id != null) + { + Console.WriteLine("Field ModuleLookup ID: " + lookup.Id); + } + } + if (field.Visible != null) + { + Console.WriteLine("Field Visible: " + field.Visible); + } + if (field.PickListValuesSortedLexically != null) + { + Console.WriteLine("Field pick list values lexically sorted: " + field.PickListValuesSortedLexically); + } + if (field.Sortable != null) + { + Console.WriteLine("Field sortable " + field.Sortable); + } + if (field.UiType != null) + { + Console.WriteLine("Field UI tyle " + field.UiType); + } + if (field.SequenceNumber != null) + { + Console.WriteLine("Field sequence number " + field.SequenceNumber); + } + List fieldProfiles = field.Profiles; + if(fieldProfiles != null) + { + foreach (Com.Zoho.Crm.API.Fields.Profile fieldProfile in fieldProfiles) + { + Console.WriteLine("Profile permission Type " + fieldProfile.PermissionType); + Console.WriteLine("Profile Name " + fieldProfile.Name); + Console.WriteLine("Profile ID " + fieldProfile.Id); + } + } + if (field.Length != null) + { + Console.WriteLine("Field Length: " + field.Length); + } + ViewType viewType = field.ViewType; + if (viewType != null) + { + Console.WriteLine("Field ViewType View: " + viewType.View); + Console.WriteLine("Field ViewType Edit: " + viewType.Edit); + Console.WriteLine("Field ViewType Create: " + viewType.Create); + Console.WriteLine("Field ViewType QuickCreate: " + viewType.QuickCreate); + } + MinifiedModule subform = field.AssociatedModule; + if (subform != null) + { + Console.WriteLine("Field Subform Module: " + subform.Module); + Console.WriteLine("Field Subform ID: " + subform.Id); + } + Console.WriteLine("Field APIName: " + field.APIName); + object unique1 = field.Unique; + if (unique1 != null) + { + if (unique1 is Unique) + { + Unique unique = (Unique)unique1; + Console.WriteLine("Field Unique Casesensitive : " + unique.Casesensitive); + } + else + { + Console.WriteLine("Field Unique : " + unique1); + } + } + Console.WriteLine("Field DataType: " + field.DataType); + Formula formula = field.Formula; + if (formula != null) + { + Console.WriteLine("Field Formula ReturnType : " + formula.ReturnType); + if (formula.Expression != null) + { + Console.WriteLine("Field Formula Expression : " + formula.Expression); + } + } + if (field.DecimalPlace != null) + { + Console.WriteLine("Field DecimalPlace: " + field.DecimalPlace); + } + Console.WriteLine("Field MassUpdate: " + field.MassUpdate); + if (field.BlueprintSupported != null) + { + Console.WriteLine("Field BlueprintSupported: " + field.BlueprintSupported); + } + Multiselectlookup multiSelectLookup = field.Multiselectlookup; + if (multiSelectLookup != null) + { + Console.WriteLine("Field MultiSelectLookup DisplayLabel: " + multiSelectLookup.DisplayLabel); + Console.WriteLine("Field MultiSelectLookup LinkingModule: " + multiSelectLookup.LinkingModule); + Console.WriteLine("Field MultiSelectLookup LookupApiname: " + multiSelectLookup.LookupApiname); + Console.WriteLine("Field MultiSelectLookup APIName: " + multiSelectLookup.APIName); + Console.WriteLine("Field MultiSelectLookup ConnectedlookupApiname: " + multiSelectLookup.ConnectedlookupApiname); + Console.WriteLine("Field MultiSelectLookup ID: " + multiSelectLookup.Id); + Console.WriteLine("Field MultiSelectLookup connected module: " + multiSelectLookup.ConnectedModule); + } + List pickListValues = field.PickListValues; + if (pickListValues != null) + { + foreach (PickListValue pickListValue in pickListValues) + { + PrintPickListValue(pickListValue); + } + } + AutoNumber autoNumber = field.Autonumber; + if (autoNumber != null) + { + Console.WriteLine("Field AutoNumber Prefix: " + autoNumber.Prefix); + Console.WriteLine("Field AutoNumber Suffix: " + autoNumber.Suffix); + if (autoNumber.StartNumber != null) + { + Console.WriteLine("Field AutoNumber StartNumber: " + autoNumber.StartNumber); + } + } + if (field.DefaultValue != null) + { + Console.WriteLine("Field DefaultValue: " + field.DefaultValue); + } + if (field.DisplayType != null) + { + Console.WriteLine("Field display type : " + field.DisplayType); + } + Console.WriteLine("Get field type" + field.Type); + if (field.External != null) + { + Console.WriteLine("Get External show " + field.External.Show); + Console.WriteLine("Get External type" + field.External.Type); + Console.WriteLine("allow multiple config" + field.External.AllowMultipleConfig); + } + if (field.Multiuserlookup != null) + { + Multiselectlookup multiuserlookup = field.Multiuserlookup; + Console.WriteLine("Get Multiselectlookup DisplayLabel" + multiuserlookup.DisplayLabel); + Console.WriteLine("Get Multiselectlookup LinkingModule" + multiuserlookup.LinkingModule); + Console.WriteLine("Get Multiselectlookup LookupAPIName" + multiuserlookup.LookupApiname); + Console.WriteLine("Get Multiselectlookup APIName" + multiuserlookup.APIName); + Console.WriteLine("Get Multiselectlookup Id" + multiuserlookup.Id); + Console.WriteLine("Get Multiselectlookup ConnectedModule" + multiuserlookup.ConnectedModule); + Console.WriteLine("Get Multiselectlookup ConnectedlookupAPIName" + multiuserlookup.ConnectedlookupApiname); + } + } + public static void PrintPickListValue(PickListValue pickListValue) + { + Console.WriteLine(" Fields PickListValue DisplayValue: " + pickListValue.DisplayValue); + Console.WriteLine(" Fields PickListValue SequenceNumber: " + pickListValue.SequenceNumber); + Console.WriteLine(" Fields PickListValue ExpectedDataType: " + pickListValue.ExpectedDataType); + Console.WriteLine(" Fields PickListValue ActualValue: " + pickListValue.ActualValue); + Console.WriteLine(" Fields PickListValue SysRefName: " + pickListValue.SysRefName); + Console.WriteLine(" Fields PickListValue Type: " + pickListValue.Type); + Console.WriteLine(" Fields PickListValue Id: " + pickListValue.Id); + foreach (Maps map in pickListValue.Maps) + { + Console.WriteLine(map); + List pickListValues = map.PickListValues; + if (pickListValues != null) + { + foreach (PickListValue plv in pickListValues) + { + Console.WriteLine(plv); + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + long layoutId = 4402480167l; + GetLayout_1(moduleAPIName, layoutId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Layouts/GetLayouts.cs b/versions/3.0.0/Samples/Layouts/GetLayouts.cs new file mode 100644 index 0000000..8766c8e --- /dev/null +++ b/versions/3.0.0/Samples/Layouts/GetLayouts.cs @@ -0,0 +1,498 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using AssociationDetails = Com.Zoho.Crm.API.Fields.AssociationDetails; +using AutoNumber = Com.Zoho.Crm.API.Fields.AutoNumber; +using Crypt = Com.Zoho.Crm.API.Fields.Crypt; +using Currency = Com.Zoho.Crm.API.Fields.Currency; +using Fields = Com.Zoho.Crm.API.Fields.Fields; +using Formula = Com.Zoho.Crm.API.Fields.Formula; +using HistoryTracking = Com.Zoho.Crm.API.Fields.HistoryTracking; +using HistoryTrackingModule = Com.Zoho.Crm.API.Fields.HistoryTrackingModule; +using Lookup = Com.Zoho.Crm.API.Fields.Lookup; +using Maps = Com.Zoho.Crm.API.Fields.Maps; +using Multiselectlookup = Com.Zoho.Crm.API.Fields.Multiselectlookup; +using PickListValue = Com.Zoho.Crm.API.Fields.PickListValue; +using Private = Com.Zoho.Crm.API.Fields.Private; +using Unique = Com.Zoho.Crm.API.Fields.Unique; +using ViewType = Com.Zoho.Crm.API.Fields.ViewType; +using APIException = Com.Zoho.Crm.API.Layouts.APIException; +using ConvertMapping = Com.Zoho.Crm.API.Layouts.ConvertMapping; +using DealLayoutMapping = Com.Zoho.Crm.API.Layouts.DealLayoutMapping; +using DefaultView = Com.Zoho.Crm.API.Layouts.DefaultView; +using LayoutsOperations = Com.Zoho.Crm.API.Layouts.LayoutsOperations; +using Profiles = Com.Zoho.Crm.API.Layouts.Profiles; +using Properties = Com.Zoho.Crm.API.Layouts.Properties; +using ResponseHandler = Com.Zoho.Crm.API.Layouts.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.Layouts.ResponseWrapper; +using Sections = Com.Zoho.Crm.API.Layouts.Sections; +using SectionField = Com.Zoho.Crm.API.Layouts.SectionField; +using Tooltip = Com.Zoho.Crm.API.Layouts.Tooltip; +using MinifiedModule = Com.Zoho.Crm.API.Modules.MinifiedModule; +using GetLayoutsParam = Com.Zoho.Crm.API.Layouts.LayoutsOperations.GetLayoutsParam; +using MinifiedLayout = Com.Zoho.Crm.API.Layouts.MinifiedLayout; +using MinifiedUser = Com.Zoho.Crm.API.Users.MinifiedUser; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Layouts +{ + public class GetLayouts + { + public static void GetLayouts_1(string moduleAPIName) + { + LayoutsOperations layoutsOperations = new LayoutsOperations(); + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(GetLayoutsParam.MODULE, moduleAPIName); + APIResponse response = layoutsOperations.GetLayouts(paramInstance); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (new List() { 204, 304 }.Contains(response.StatusCode)) + { + Console.WriteLine(response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper)responseHandler; + List layouts = responseWrapper.Layouts; + foreach (Com.Zoho.Crm.API.Layouts.Layouts layout in layouts) + { + if (layout.CreatedTime != null) + { + Console.WriteLine("Layout CreatedTime: " + layout.CreatedTime); + } + if (layout.ConvertMapping != null) + { + ConvertMapping convertMapping = layout.ConvertMapping; + MinifiedLayout accounts = convertMapping.Accounts; + MinifiedLayout contacts = convertMapping.Contacts; + DealLayoutMapping deals = convertMapping.Deals; + } + Console.WriteLine("Layout Visible: " + layout.Visible); + MinifiedUser createdFor = layout.CreatedFor; + if (createdFor != null) + { + Console.WriteLine("Layout CreatedFor User-Name: " + createdFor.Name); + Console.WriteLine("Layout CreatedFor User-ID: " + createdFor.Id); + Console.WriteLine("Layout CreatedFor User-Email: " + createdFor.Email); + } + List profiles = layout.Profiles; + if (profiles != null) + { + foreach (Profiles profile in profiles) + { + Console.WriteLine("Layout Profile Default: " + profile.Default); + Console.WriteLine("Layout Profile Name: " + profile.Name); + Console.WriteLine("Layout Profile ID: " + profile.Id); + DefaultView defaultView = profile.Defaultview; + if (defaultView != null) + { + Console.WriteLine("Layout Profile DefaultView Name: " + defaultView.Name); + Console.WriteLine("Layout Profile DefaultView ID: " + defaultView.Id); + Console.WriteLine("Layout Profile DefaultView Type: " + defaultView.Type); + } + } + } + MinifiedUser createdBy = layout.CreatedBy; + if (createdBy != null) + { + Console.WriteLine("Layout CreatedBy User-Name: " + createdBy.Name); + Console.WriteLine("Layout CreatedBy User-ID: " + createdBy.Id); + Console.WriteLine("Layout CreatedBy User-Email: " + createdBy.Email); + } + List sections = layout.Sections; + if (sections != null) + { + foreach (Sections section in sections) + { + Console.WriteLine("Layout Section DisplayLabel: " + section.DisplayLabel); + Console.WriteLine("Layout Section SequenceNumber: " + section.SequenceNumber); + Console.WriteLine("Layout Section IsSubformSection: " + section.Issubformsection); + Console.WriteLine("Layout Section TabTraversal: " + section.TabTraversal); + Console.WriteLine("Layout Section APIName: " + section.APIName); + Console.WriteLine("Layout Section ColumnCount: " + section.ColumnCount); + Console.WriteLine("Layout Section Name: " + section.Name); + Console.WriteLine("Layout Section GeneratedType: " + section.GeneratedType); + Console.WriteLine("Layout Section Type: " + section.Type); + List fields = section.Fields; + if (fields != null) + { + foreach (Com.Zoho.Crm.API.Fields.Fields field in fields) + { + PrintField(field); + } + } + Properties properties = section.Properties; + if (properties != null) + { + Console.WriteLine("Layout Section Properties ReorderRows: " + properties.ReorderRows); + Tooltip tooltip = properties.Tooltip; + if (tooltip != null) + { + Console.WriteLine("Layout Section Properties ToolTip Name:" + tooltip.Name); + Console.WriteLine("Layout Section Properties ToolTip Value:" + tooltip.Value); + } + Console.WriteLine("Layout Section Properties MaximumRows: " + properties.MaximumRows); + } + } + } + Console.WriteLine("Layout buisness card: " + layout.ShowBusinessCard); + if (layout.ModifiedTime != null) + { + Console.WriteLine("Layout ModifiedTime: " + layout.ModifiedTime); + } + Console.WriteLine("Layout Name: " + layout.Name); + MinifiedUser modifiedBy = layout.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine("Layout ModifiedBy User-Name: " + modifiedBy.Name); + Console.WriteLine("Layout ModifiedBy User-ID: " + modifiedBy.Id); + Console.WriteLine("Layout ModifiedBy User-Email: " + modifiedBy.Email); + } + Console.WriteLine("Layout ID: " + layout.Id); + Console.WriteLine("Layout Status: " + layout.Status); + Console.WriteLine("Layout DisplayType : " + layout.DisplayType); + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException)responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + private static void PrintField(Com.Zoho.Crm.API.Fields.Fields field) + { + Console.WriteLine("Field SystemMandatory: " + field.SystemMandatory); + Console.WriteLine("Field Webhook: " + field.Webhook); + Console.WriteLine("Field JsonType: " + field.JsonType); + Private privateInfo = field.Private; + if (privateInfo != null) + { + Console.WriteLine("Private Details"); + Console.WriteLine("Field Private Type: " + privateInfo.Type); + Console.WriteLine("Field Private Export: " + privateInfo.Export); + Console.WriteLine("Field Private Restricted: " + privateInfo.Restricted); + } + Crypt crypt = field.Crypt; + if (crypt != null) + { + Console.WriteLine("Field Crypt Mode: " + crypt.Mode); + Console.WriteLine("Field Crypt Column: " + crypt.Column); + Console.WriteLine("Field Crypt Table: " + crypt.Table); + Console.WriteLine("Field Crypt Status: " + crypt.Status); + List encFldIds = crypt.Encfldids; + if (encFldIds != null) + { + Console.WriteLine("EncFldIds : "); + foreach (string encFldId in encFldIds) + { + Console.WriteLine(encFldId); + } + } + Console.WriteLine("Field Crypt Notify: " + crypt.Notify); + } + Console.WriteLine("Field FieldLabel: " + field.FieldLabel); + Com.Zoho.Crm.API.Fields.Tooltip tooltip = field.Tooltip; + if (tooltip != null) + { + Console.WriteLine("Field ToolTip Name: " + tooltip.Name); + Console.WriteLine("Field ToolTip Value: " + tooltip.Value); + } + Console.WriteLine("Field CreatedSource: " + field.CreatedSource); + Console.WriteLine("Field FieldReadOnly: " + field.FieldReadOnly); + Console.WriteLine("Field DisplayLabel: " + field.DisplayLabel); + Console.WriteLine("Field ReadOnly: " + field.ReadOnly); + AssociationDetails associationDetails = field.AssociationDetails; + if (associationDetails != null) + { + MinifiedModule lookupField = associationDetails.LookupField; + if (lookupField != null) + { + Console.WriteLine("Field AssociationDetails LookupField ID: " + lookupField.Id); + Console.WriteLine("Field AssociationDetails LookupField Name: " + lookupField.APIName); + } + MinifiedModule relatedField = associationDetails.RelatedField; + if (relatedField != null) + { + Console.WriteLine("Field AssociationDetails RelatedField ID: " + relatedField.Id); + Console.WriteLine("Field AssociationDetails RelatedField Name: " + relatedField.APIName); + } + } + Console.WriteLine("Field Filterable: " + field.Filterable); + if (field.ConvertMapping != null) + { + if (field.ConvertMapping != null) + { + Com.Zoho.Crm.API.Fields.ConvertMapping convertMapping = field.ConvertMapping; + Console.WriteLine(convertMapping.Accounts); + Console.WriteLine(convertMapping.Contacts); + Console.WriteLine(convertMapping.Deals); + } + } + if (field.HistoryTracking != null) + { + HistoryTracking historytracking = field.HistoryTracking; + HistoryTrackingModule module = historytracking.Module; + if (module != null) + { + Com.Zoho.Crm.API.Layouts.Layouts moduleLayout = module.Layout; + if (moduleLayout != null) + { + Console.WriteLine("Module layout id" + moduleLayout.Id); + } + Console.WriteLine("Module layout display label" + module.DisplayLabel); + Console.WriteLine("Module layout api name" + module.APIName); + Console.WriteLine("Module layout module" + module.Id); + Console.WriteLine("Module layout id" + module.Module); + Console.WriteLine("Module layout module name" + module.ModuleName); + } + MinifiedModule durationConfigured = historytracking.DurationConfiguredField; + if (durationConfigured != null) + { + Console.WriteLine("historytracking duration configured field" + durationConfigured.Id); + } + } + Console.WriteLine("Field BusinesscardSupported: " + field.BusinesscardSupported); + Currency currency = field.Currency; + if (currency != null) + { + Console.WriteLine("Field Currency RoundingOption: " + currency.RoundingOption); + if (currency.Precision != null) + { + Console.WriteLine("Field Currency Precision: " + currency.Precision); + } + } + Console.WriteLine("Field ID: " + field.Id); + if (field.CustomField != null) + { + Console.WriteLine("Field CustomField: " + field.CustomField); + } + Lookup lookup = field.Lookup; + if (lookup != null) + { + Console.WriteLine("Field ModuleLookup DisplayLabel: " + lookup.DisplayLabel); + Console.WriteLine("Field ModuleLookup APIName: " + lookup.APIName); + Console.WriteLine("Field ModuleLookup Module: " + lookup.Module); + if (lookup.Id != null) + { + Console.WriteLine("Field ModuleLookup ID: " + lookup.Id); + } + } + if (field.Visible != null) + { + Console.WriteLine("Field Visible: " + field.Visible); + } + if (field.PickListValuesSortedLexically != null) + { + Console.WriteLine("Field pick list values lexically sorted: " + field.PickListValuesSortedLexically); + } + if (field.Sortable != null) + { + Console.WriteLine("Field sortable " + field.Sortable); + } + if (field.UiType != null) + { + Console.WriteLine("Field UI tyle " + field.UiType); + } + if (field.SequenceNumber != null) + { + Console.WriteLine("Field sequence number " + field.SequenceNumber); + } + List fieldProfiles = field.Profiles; + if (fieldProfiles != null) + { + foreach (Com.Zoho.Crm.API.Fields.Profile fieldProfile in fieldProfiles) + { + Console.WriteLine("Profile permission Type " + fieldProfile.PermissionType); + Console.WriteLine("Profile Name " + fieldProfile.Name); + Console.WriteLine("Profile ID " + fieldProfile.Id); + } + } + if (field.Length != null) + { + Console.WriteLine("Field Length: " + field.Length); + } + ViewType viewType = field.ViewType; + if (viewType != null) + { + Console.WriteLine("Field ViewType View: " + viewType.View); + Console.WriteLine("Field ViewType Edit: " + viewType.Edit); + Console.WriteLine("Field ViewType Create: " + viewType.Create); + Console.WriteLine("Field ViewType QuickCreate: " + viewType.QuickCreate); + } + MinifiedModule subform = field.AssociatedModule; + if (subform != null) + { + Console.WriteLine("Field Subform Module: " + subform.Module); + Console.WriteLine("Field Subform ID: " + subform.Id); + } + Console.WriteLine("Field APIName: " + field.APIName); + object unique1 = field.Unique; + if (unique1 != null) + { + if (unique1 is Unique) + { + Unique unique = (Unique)unique1; + Console.WriteLine("Field Unique Casesensitive : " + unique.Casesensitive); + } + else + { + Console.WriteLine("Field Unique : " + unique1); + } + } + Console.WriteLine("Field DataType: " + field.DataType); + Formula formula = field.Formula; + if (formula != null) + { + Console.WriteLine("Field Formula ReturnType : " + formula.ReturnType); + if (formula.Expression != null) + { + Console.WriteLine("Field Formula Expression : " + formula.Expression); + } + } + if (field.DecimalPlace != null) + { + Console.WriteLine("Field DecimalPlace: " + field.DecimalPlace); + } + Console.WriteLine("Field MassUpdate: " + field.MassUpdate); + if (field.BlueprintSupported != null) + { + Console.WriteLine("Field BlueprintSupported: " + field.BlueprintSupported); + } + Multiselectlookup multiSelectLookup = field.Multiselectlookup; + if (multiSelectLookup != null) + { + Console.WriteLine("Field MultiSelectLookup DisplayLabel: " + multiSelectLookup.DisplayLabel); + Console.WriteLine("Field MultiSelectLookup LinkingModule: " + multiSelectLookup.LinkingModule); + Console.WriteLine("Field MultiSelectLookup LookupApiname: " + multiSelectLookup.LookupApiname); + Console.WriteLine("Field MultiSelectLookup APIName: " + multiSelectLookup.APIName); + Console.WriteLine("Field MultiSelectLookup ConnectedlookupApiname: " + multiSelectLookup.ConnectedlookupApiname); + Console.WriteLine("Field MultiSelectLookup ID: " + multiSelectLookup.Id); + Console.WriteLine("Field MultiSelectLookup connected module: " + multiSelectLookup.ConnectedModule); + } + List pickListValues = field.PickListValues; + if (pickListValues != null) + { + foreach (PickListValue pickListValue in pickListValues) + { + PrintPickListValue(pickListValue); + } + } + AutoNumber autoNumber = field.AutoNumber61; + if (autoNumber != null) + { + Console.WriteLine("Field AutoNumber Prefix: " + autoNumber.Prefix); + Console.WriteLine("Field AutoNumber Suffix: " + autoNumber.Suffix); + if (autoNumber.StartNumber != null) + { + Console.WriteLine("Field AutoNumber StartNumber: " + autoNumber.StartNumber); + } + } + if (field.DefaultValue != null) + { + Console.WriteLine("Field DefaultValue: " + field.DefaultValue); + } + if (field.DisplayType != null) + { + Console.WriteLine("Field display type : " + field.DisplayType); + } + Console.WriteLine("Get field type" + field.Type); + if (field.External != null) + { + Console.WriteLine("Get External show " + field.External.Show); + Console.WriteLine("Get External type" + field.External.Type); + Console.WriteLine("allow multiple config" + field.External.AllowMultipleConfig); + } + if (field.Multiuserlookup != null) + { + Multiselectlookup multiuserlookup = field.Multiuserlookup; + Console.WriteLine("Get Multiselectlookup DisplayLabel" + multiuserlookup.DisplayLabel); + Console.WriteLine("Get Multiselectlookup LinkingModule" + multiuserlookup.LinkingModule); + Console.WriteLine("Get Multiselectlookup LookupAPIName" + multiuserlookup.LookupApiname); + Console.WriteLine("Get Multiselectlookup APIName" + multiuserlookup.APIName); + Console.WriteLine("Get Multiselectlookup Id" + multiuserlookup.Id); + Console.WriteLine("Get Multiselectlookup ConnectedModule" + multiuserlookup.ConnectedModule); + Console.WriteLine("Get Multiselectlookup ConnectedlookupAPIName" + multiuserlookup.ConnectedlookupApiname); + } + } + + public static void PrintPickListValue(PickListValue pickListValue) + { + Console.WriteLine(" Fields PickListValue DisplayValue: " + pickListValue.DisplayValue); + Console.WriteLine(" Fields PickListValue SequenceNumber: " + pickListValue.SequenceNumber); + Console.WriteLine(" Fields PickListValue ExpectedDataType: " + pickListValue.ExpectedDataType); + Console.WriteLine(" Fields PickListValue ActualValue: " + pickListValue.ActualValue); + Console.WriteLine(" Fields PickListValue SysRefName: " + pickListValue.SysRefName); + Console.WriteLine(" Fields PickListValue Type: " + pickListValue.Type); + Console.WriteLine(" Fields PickListValue Id: " + pickListValue.Id); + foreach (Maps map in pickListValue.Maps) + { + Console.WriteLine(map); + List pickListValues = map.PickListValues; + if (pickListValues != null) + { + foreach (PickListValue plv in pickListValues) + { + Console.WriteLine(plv); + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + GetLayouts_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/MassDeleteTags1/GetStatus.cs b/versions/3.0.0/Samples/MassDeleteTags1/GetStatus.cs new file mode 100644 index 0000000..7bf86ec --- /dev/null +++ b/versions/3.0.0/Samples/MassDeleteTags1/GetStatus.cs @@ -0,0 +1,111 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.MassDeleteTags; +using Com.Zoho.Crm.API; +using static Com.Zoho.Crm.API.MassDeleteTags.MassDeleteTagsOperations; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; + +namespace Samples.MassDeleteTags1 +{ + public class GetStatus + { + public static void GetStatus_1() + { + MassDeleteTagsOperations massDeleteTagsOperations = new MassDeleteTagsOperations(); + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(GetStatusParam.JOB_ID, "3477022003"); + APIResponse response = massDeleteTagsOperations.GetStatus(paramInstance); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + StatusResponseHandler responseHandler = response.Object; + if (responseHandler is StatusResponseWrapper) + { + StatusResponseWrapper statusResponseWrapper = (StatusResponseWrapper) responseHandler; + List statusActionResponse = statusResponseWrapper.MassDelete; + foreach (StatusActionResponse statusActionResponse1 in statusActionResponse) + { + if (statusActionResponse1 is MassDeleteDetails) + { + MassDeleteDetails massDeleteDetail = (MassDeleteDetails) statusActionResponse1; + Console.WriteLine("Status JobId: " + massDeleteDetail.JobId); + Console.WriteLine("Status TotalCount: " + massDeleteDetail.TotalCount); + Console.WriteLine("Status FailedCount: " + massDeleteDetail.FailedCount); + Console.WriteLine("Status DeletedCount: " + massDeleteDetail.DeletedCount); + Console.WriteLine("Job Status: " + massDeleteDetail.Status.Value); + } + else if (statusActionResponse1 is APIException) + { + APIException exception = (APIException)statusActionResponse1; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException)responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetStatus_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/MassDeleteTags1/MassDeleteTags.cs b/versions/3.0.0/Samples/MassDeleteTags1/MassDeleteTags.cs new file mode 100644 index 0000000..4ab7bd7 --- /dev/null +++ b/versions/3.0.0/Samples/MassDeleteTags1/MassDeleteTags.cs @@ -0,0 +1,107 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.MassDeleteTags; +using System.Collections.Generic; +using Com.Zoho.Crm.API.Util; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; +using Module = Com.Zoho.Crm.API.MassDeleteTags.Module; + +namespace Samples.MassDeleteTags1 +{ + public class MassDeleteTags + { + public static void MassDeleteTags_1() + { + MassDeleteTagsOperations massDeleteTagsOperations = new MassDeleteTagsOperations(); + BodyWrapper request = new BodyWrapper(); + List massDelete = new List(); + MassDelete massDelete1 = new MassDelete(); + Module module = new Module(); + module.APIName = "Leads"; + module.Id = 347706002175l; + massDelete1.Module = module; + List tags = new List(); + Tag tag = new Tag(); + tag.Id = 34770689001l; + tags.Add(tag); + tag = new Tag(); + tag.Id = 34770628007l; + tags.Add(tag); + massDelete1.Tags = tags; + massDelete.Add(massDelete1); + request.MassDelete = massDelete; + APIResponse response = massDeleteTagsOperations.MassDeleteTags(request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionResponse actionResponse = response.Object; + if (actionResponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse)actionResponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException)actionResponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + MassDeleteTags_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/Notes/CreateNotes.cs b/versions/3.0.0/Samples/Notes/CreateNotes.cs new file mode 100644 index 0000000..7c0938a --- /dev/null +++ b/versions/3.0.0/Samples/Notes/CreateNotes.cs @@ -0,0 +1,131 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Notes.APIException; +using ActionHandler = Com.Zoho.Crm.API.Notes.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Notes.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Notes.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Notes.BodyWrapper; +using NotesOperations = Com.Zoho.Crm.API.Notes.NotesOperations; +using SuccessResponse = Com.Zoho.Crm.API.Notes.SuccessResponse; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; +using Com.Zoho.Crm.API.Modules; + +namespace Samples.Notes +{ + public class CreateNotes + { + public static void CreateNotes_1() + { + NotesOperations notesOperations = new NotesOperations(); + BodyWrapper bodyWrapper = new BodyWrapper(); + List notes = new List(); + for (int i = 1; i <= 5; i++) + { + Com.Zoho.Crm.API.Notes.Note note = new Com.Zoho.Crm.API.Notes.Note(); + note.NoteTitle = "Contacted"; + note.NoteContent = "Need to do further tracking"; + Com.Zoho.Crm.API.Notes.ParentId parentRecord = new Com.Zoho.Crm.API.Notes.ParentId(); + parentRecord.Id = 347703778003; + MinifiedModule module = new MinifiedModule(); + module.APIName = "Leads"; + module.Id = 347706002175; + parentRecord.Module = module; + note.ParentId = parentRecord; + notes.Add (note); + } + bodyWrapper.Data = notes; + APIResponse response = notesOperations.CreateNotes(bodyWrapper); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + CreateNotes_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Notes/DeleteNote.cs b/versions/3.0.0/Samples/Notes/DeleteNote.cs new file mode 100644 index 0000000..19e49d3 --- /dev/null +++ b/versions/3.0.0/Samples/Notes/DeleteNote.cs @@ -0,0 +1,117 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Notes.APIException; +using ActionHandler = Com.Zoho.Crm.API.Notes.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Notes.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Notes.ActionWrapper; +using NotesOperations = Com.Zoho.Crm.API.Notes.NotesOperations; +using SuccessResponse = Com.Zoho.Crm.API.Notes.SuccessResponse; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Notes +{ + public class DeleteNote + { + public static void DeleteNote_1(long noteId) + { + NotesOperations notesOperations = new NotesOperations(); + APIResponse response = notesOperations.DeleteNote(noteId); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + if (exception.Details != null) + { + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long noteId = 4402480012905; + DeleteNote_1(noteId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Notes/DeleteNotes.cs b/versions/3.0.0/Samples/Notes/DeleteNotes.cs new file mode 100644 index 0000000..9e233c9 --- /dev/null +++ b/versions/3.0.0/Samples/Notes/DeleteNotes.cs @@ -0,0 +1,121 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Notes.APIException; +using ActionHandler = Com.Zoho.Crm.API.Notes.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Notes.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Notes.ActionWrapper; +using NotesOperations = Com.Zoho.Crm.API.Notes.NotesOperations; +using SuccessResponse = Com.Zoho.Crm.API.Notes.SuccessResponse; +using DeleteNotesParam = Com.Zoho.Crm.API.Notes.NotesOperations.DeleteNotesParam; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Notes +{ + public class DeleteNotes + { + public static void DeleteNotes_1(List notesId) + { + NotesOperations notesOperations = new NotesOperations(); + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(DeleteNotesParam.IDS, string.Join(",", notesId)); ; + APIResponse response = notesOperations.DeleteNotes(paramInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + if (exception.Details != null) + { + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + List notesId = new List() { "34770616153001", "34770616153002" } ; + DeleteNotes_1(notesId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Notes/GetNote.cs b/versions/3.0.0/Samples/Notes/GetNote.cs new file mode 100644 index 0000000..473bd10 --- /dev/null +++ b/versions/3.0.0/Samples/Notes/GetNote.cs @@ -0,0 +1,186 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Attachment = Com.Zoho.Crm.API.Attachments.Attachment; +using ParentId = Com.Zoho.Crm.API.Attachments.ParentId; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Notes.APIException; +using NotesOperations = Com.Zoho.Crm.API.Notes.NotesOperations; +using ResponseHandler = Com.Zoho.Crm.API.Notes.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.Notes.ResponseWrapper; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Notes +{ + public class GetNote + { + public static void GetNote_1(long noteId) + { + NotesOperations notesOperations = new NotesOperations(); + ParameterMap paramInstance = new ParameterMap(); + HeaderMap headerInstance = new HeaderMap(); + APIResponse response = notesOperations.GetNote(noteId, paramInstance, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List notes = responseWrapper.Data; + foreach (Com.Zoho.Crm.API.Notes.Note note in notes) + { + Com.Zoho.Crm.API.Users.MinifiedUser owner = note.Owner; + if (owner != null) + { + Console.WriteLine ("Note Owner User-Name: " + owner.Name); + Console.WriteLine ("Note Owner User-ID: " + owner.Id); + Console.WriteLine ("Note Owner Email: " + owner.Email); + } + Console.WriteLine ("Note ModifiedTime: " + note.ModifiedTime); + List attachments = note.Attachments; + if (attachments != null) + { + foreach (Attachment attachment in attachments) + { + printAttachment(attachment); + } + } + Console.WriteLine ("Note CreatedTime: " + note.CreatedTime); + Com.Zoho.Crm.API.Notes.ParentId parentId = note.ParentId; + if (parentId != null) + { + Console.WriteLine ("Note parent record Name: " + parentId.Name); + Console.WriteLine ("Note parent record ID: " + parentId.Id); + } + Console.WriteLine ("Note Editable: " + note.Editable); + Console.WriteLine ("Note IsSharedToClient: " + note.IsSharedToClient); + Com.Zoho.Crm.API.Users.MinifiedUser modifiedBy = note.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Note Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Note Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Note Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Note Size: " + note.Size); + Console.WriteLine ("Note State: " + note.State); + Console.WriteLine ("Note VoiceNote: " + note.VoiceNote); + Console.WriteLine ("Note Id: " + note.Id); + Com.Zoho.Crm.API.Users.MinifiedUser createdBy = note.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Note Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Note Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Note Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Note NoteTitle: " + note.NoteTitle); + Console.WriteLine ("Note NoteContent: " + note.NoteContent); + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + private static void printAttachment(Attachment attachment) + { + Com.Zoho.Crm.API.Users.MinifiedUser owner = attachment.Owner; + if (owner != null) + { + Console.WriteLine ("Note Attachment Owner User-Name: " + owner.Name); + Console.WriteLine ("Note Attachment Owner User-ID: " + owner.Id); + Console.WriteLine ("Note Attachment Owner User-Email: " + owner.Email); + } + Console.WriteLine ("Note Attachment Modified Time: " + attachment.ModifiedTime); + Console.WriteLine ("Note Attachment File Name: " + attachment.FileName); + Console.WriteLine ("Note Attachment Created Time: " + attachment.CreatedTime); + Console.WriteLine ("Note Attachment File Size: " + attachment.Size); + ParentId parentId = attachment.ParentId; + if (parentId != null) + { + Console.WriteLine ("Note Attachment parent record Name: " + parentId.Name); + Console.WriteLine ("Note Attachment parent record ID: " + parentId.Id); + } + Console.WriteLine ("Note Attachment is Editable: " + attachment.Editable); + Console.WriteLine ("Note Attachment is SharingPermission: " + attachment.SharingPermission); + Console.WriteLine ("Note Attachment File ID: " + attachment.FileId); + Console.WriteLine ("Note Attachment File Type: " + attachment.Type); + Console.WriteLine ("Note Attachment seModule: " + attachment.SeModule); + Com.Zoho.Crm.API.Users.MinifiedUser modifiedBy = attachment.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Note Attachment Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Note Attachment Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Note Attachment Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Note Attachment State: " + attachment.State); + Console.WriteLine ("Note Attachment ID: " + attachment.Id); + Com.Zoho.Crm.API.Users.MinifiedUser createdBy = attachment.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Note Attachment Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Note Attachment Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Note Attachment Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Note Attachment LinkUrl: " + attachment.LinkUrl); + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long noteId = 34770616153005; + GetNote_1(noteId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Notes/GetNotes.cs b/versions/3.0.0/Samples/Notes/GetNotes.cs new file mode 100644 index 0000000..82c09a7 --- /dev/null +++ b/versions/3.0.0/Samples/Notes/GetNotes.cs @@ -0,0 +1,215 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Attachment = Com.Zoho.Crm.API.Attachments.Attachment; +using ParentId = Com.Zoho.Crm.API.Attachments.ParentId; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Notes.APIException; +using Info = Com.Zoho.Crm.API.Notes.Info; +using NotesOperations = Com.Zoho.Crm.API.Notes.NotesOperations; +using ResponseHandler = Com.Zoho.Crm.API.Notes.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.Notes.ResponseWrapper; +using GetNotesHeader = Com.Zoho.Crm.API.Notes.NotesOperations.GetNotesHeader; +using GetNotesParam = Com.Zoho.Crm.API.Notes.NotesOperations.GetNotesParam; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Notes +{ + public class GetNotes + { + public static void GetNotes_1() + { + NotesOperations notesOperations = new NotesOperations(); + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add (GetNotesParam.PAGE, "1"); + paramInstance.Add (GetNotesParam.PER_PAGE, "10"); + paramInstance.Add (GetNotesParam.FIELDS, "id"); + //paramInstance.Add (new Param("ids", null), "3477008207"); + HeaderMap headerInstance = new HeaderMap(); + DateTimeOffset startdatetime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + headerInstance.Add(GetNotesHeader.IF_MODIFIED_SINCE, startdatetime); + APIResponse response = notesOperations.GetNotes(paramInstance, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List notes = responseWrapper.Data; + foreach (Com.Zoho.Crm.API.Notes.Note note in notes) + { + Com.Zoho.Crm.API.Users.MinifiedUser owner = note.Owner; + if (owner != null) + { + Console.WriteLine ("Note Owner User-Name: " + owner.Name); + Console.WriteLine ("Note Owner User-ID: " + owner.Id); + Console.WriteLine ("Note Owner Email: " + owner.Email); + } + Console.WriteLine ("Note ModifiedTime: " + note.ModifiedTime); + List attachments = note.Attachments; + if (attachments != null) + { + foreach (Attachment attachment in attachments) + { + printAttachment(attachment); + } + } + Console.WriteLine ("Note CreatedTime: " + note.CreatedTime); + Com.Zoho.Crm.API.Notes.ParentId parentId = note.ParentId; + if (parentId != null) + { + Console.WriteLine ("Note parent record Name: " + parentId.Name); + Console.WriteLine ("Note parent record ID: " + parentId.Id); + } + Console.WriteLine ("Note Editable: " + note.Editable); + Console.WriteLine ("Note SharingPermission: " + note.SharingPermission); + Console.WriteLine ("Note IsSharedToClient: " + note.IsSharedToClient); + Com.Zoho.Crm.API.Users.MinifiedUser modifiedBy = note.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Note Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Note Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Note Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Note Size: " + note.Size); + Console.WriteLine ("Note State: " + note.State); + Console.WriteLine ("Note VoiceNote: " + note.VoiceNote); + Console.WriteLine ("Note Id: " + note.Id); + Com.Zoho.Crm.API.Users.MinifiedUser createdBy = note.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Note Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Note Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Note Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Note NoteTitle: " + note.NoteTitle); + Console.WriteLine ("Note NoteContent: " + note.NoteContent); + } + Info info = responseWrapper.Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine ("Note Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine ("Note Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine ("Note Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine ("Note Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + private static void printAttachment(Attachment attachment) + { + Com.Zoho.Crm.API.Users.MinifiedUser owner = attachment.Owner; + if (owner != null) + { + Console.WriteLine ("Note Attachment Owner User-Name: " + owner.Name); + Console.WriteLine ("Note Attachment Owner User-ID: " + owner.Id); + Console.WriteLine ("Note Attachment Owner User-Email: " + owner.Email); + } + Console.WriteLine ("Note Attachment Modified Time: " + attachment.ModifiedTime); + Console.WriteLine ("Note Attachment File Name: " + attachment.FileName); + Console.WriteLine ("Note Attachment Created Time: " + attachment.CreatedTime); + Console.WriteLine ("Note Attachment File Size: " + attachment.Size); + ParentId parentId = attachment.ParentId; + if (parentId != null) + { + Console.WriteLine ("Note Attachment parent record Name: " + parentId.Name); + Console.WriteLine ("Note Attachment parent record ID: " + parentId.Id); + } + Console.WriteLine ("Note Attachment is Editable: " + attachment.Editable); + Console.WriteLine ("Note Attachment is SharingPermission: " + attachment.SharingPermission); + Console.WriteLine ("Note Attachment File ID: " + attachment.FileId); + Console.WriteLine ("Note Attachment File Type: " + attachment.Type); + Console.WriteLine ("Note Attachment seModule: " + attachment.SeModule); + Com.Zoho.Crm.API.Users.MinifiedUser modifiedBy = attachment.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Note Attachment Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Note Attachment Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Note Attachment Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Note Attachment State: " + attachment.State); + Console.WriteLine ("Note Attachment ID: " + attachment.Id); + Com.Zoho.Crm.API.Users.MinifiedUser createdBy = attachment.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Note Attachment Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Note Attachment Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Note Attachment Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Note Attachment LinkUrl: " + attachment.LinkUrl); + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetNotes_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Notes/UpdateNote.cs b/versions/3.0.0/Samples/Notes/UpdateNote.cs new file mode 100644 index 0000000..748d16f --- /dev/null +++ b/versions/3.0.0/Samples/Notes/UpdateNote.cs @@ -0,0 +1,132 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Notes.APIException; +using ActionHandler = Com.Zoho.Crm.API.Notes.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Notes.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Notes.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Notes.BodyWrapper; +using NotesOperations = Com.Zoho.Crm.API.Notes.NotesOperations; +using SuccessResponse = Com.Zoho.Crm.API.Notes.SuccessResponse; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; +using Com.Zoho.Crm.API.Modules; + +namespace Samples.Notes +{ + public class UpdateNote + { + public static void UpdateNote_1(long noteId) + { + NotesOperations notesOperations = new NotesOperations(); + BodyWrapper bodyWrapper = new BodyWrapper(); + List notes = new List(); + Com.Zoho.Crm.API.Notes.Note note = new Com.Zoho.Crm.API.Notes.Note(); + note.NoteTitle = "Contacted12"; + note.NoteContent = "Need to do further tracking12"; + Com.Zoho.Crm.API.Notes.ParentId parentRecord = new Com.Zoho.Crm.API.Notes.ParentId(); + parentRecord.Id = 34770617255001; + MinifiedModule module = new MinifiedModule(); + module.APIName = "Leads"; + module.Id = 347706000002175; + parentRecord.Module = module; + note.ParentId = parentRecord; + notes.Add (note); + bodyWrapper.Data = notes; + APIResponse response = notesOperations.UpdateNote(noteId, bodyWrapper); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + if (exception.Details != null) + { + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long noteId = 34770616153005; + UpdateNote_1(noteId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/PickListValues/GetPickListValues.cs b/versions/3.0.0/Samples/PickListValues/GetPickListValues.cs new file mode 100644 index 0000000..a52411f --- /dev/null +++ b/versions/3.0.0/Samples/PickListValues/GetPickListValues.cs @@ -0,0 +1,107 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.PickListValues; +using Com.Zoho.Crm.API.Util; + +namespace Samples.PickListValues +{ + public class GetPickListValues + { + public static void GetPickListValues_1(long fieldId, string moduleAPIName) + { + PickListValuesOperations pickListValuesOperations = new PickListValuesOperations(fieldId, moduleAPIName); + APIResponse response = pickListValuesOperations.GetPickListValues(); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.StatusCode() == 204) + { + Console.WriteLine ("No Content"); + return; + } + if (response.isExpected()) + { + ResponseHandler responseHandler = response.Object(); + if (responseHandler instanceof ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List pickListValues = responseWrapper.PickListValues(); + if(pickListValues != null) + { + for(PickListValues pickListValue : pickListValues) + { + Console.WriteLine ("PickListValues SequenceNumber : " + pickListValue.SequenceNumber); + Console.WriteLine ("PickListValues DisplayValue : " + pickListValue.DisplayValue); + Console.WriteLine ("PickListValues ReferenceValue : " + pickListValue.ReferenceValue); + Console.WriteLine ("PickListValues ColourCode( : " + pickListValue.ColourCode); + Console.WriteLine ("PickListValues ActualValue : " + pickListValue.ActualValue); + Console.WriteLine ("PickListValues Id : " + pickListValue.Id); + Console.WriteLine ("PickListValues Type : " + pickListValue.Type); + List layoutAssociations = pickListValue.LayoutAssociations(); + if(layoutAssociations != null) + { + for(LayoutAssociation layoutAssociation : layoutAssociations) + { + Console.WriteLine ("PickListValues LayoutAssociation Id : " + layoutAssociation.Id); + Console.WriteLine ("PickListValues LayoutAssociation Name : " + layoutAssociation.Name); + Console.WriteLine ("PickListValues LayoutAssociation APIName : " + layoutAssociation.APIName); + } + } + } + } + } + else if (responseHandler instanceof APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else if (response.StatusCode != 204) + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + long fieldId = 3477061000000002619; + GetPickListValues_1(fieldId, moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/Record/CloneRecord.cs b/versions/3.0.0/Samples/Record/CloneRecord.cs new file mode 100644 index 0000000..6be6c77 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CloneRecord.cs @@ -0,0 +1,111 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; + +namespace Samples.Record +{ + public class CloneRecord + { + public static void CloneRecord_1(string moduleAPIName, long recordId) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + APIResponse response = recordOperations.CloneRecord(recordId); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + long recordId = 44024000774074l; + CloneRecord_1(moduleAPIName, recordId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Accounts.cs b/versions/3.0.0/Samples/Record/CreateRecords/Accounts.cs new file mode 100644 index 0000000..4956199 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Accounts.cs @@ -0,0 +1,221 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + +namespace Samples.Record.CreateRecords +{ + public class Accounts + { + public static void CreateAccounts_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_NAME, "new Account"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.RATING, new Choice("Active")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.PHONE, "111111"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_SITE, "www.account.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.FAX, "fax"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.WEBSITE, null); + Com.Zoho.Crm.API.Record.Record parentAccount = new Com.Zoho.Crm.API.Record.Record(); + parentAccount.Id = 4230432933L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.PARENT_ACCOUNT, parentAccount); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_NUMBER, 121121L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_TYPE, new Choice("Customer")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ANNUAL_REVENUE, 2121.1); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.EMPLOYEES, 100); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.INDUSTRY, new Choice("Technology")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SIC_CODE, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.OWNERSHIP, new Choice("Private")); + // Address info of Account + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_STREET, "shipping street"); + // + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23db0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0ca878a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() { new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Accounts"; + CreateAccounts_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Calls.cs b/versions/3.0.0/Samples/Record/CreateRecords/Calls.cs new file mode 100644 index 0000000..91f86cd --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Calls.cs @@ -0,0 +1,229 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Calls + { + public static void CreateCall_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + // Schedule a Call + Com.Zoho.Crm.API.Record.Record whoId = new Com.Zoho.Crm.API.Record.Record(); + whoId.Id = 4402481030088L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHO_ID, whoId); + Com.Zoho.Crm.API.Record.Record whatId = new Com.Zoho.Crm.API.Record.Record(); + whatId.Id = 440248884001L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHAT_ID, whatId); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_TYPE, new Choice("Outbound")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.OUTGOING_CALL_STATUS, new Choice("Scheduled")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_START_TIME, new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + Com.Zoho.Crm.API.Record.Record user = new Com.Zoho.Crm.API.Record.Record(); + user.Id = 440248254001L; + record1.AddKeyValue("Call_Owner", user); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.SUBJECT, "call scheduled"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.REMINDER, new Choice("5 mins")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_PURPOSE, new Choice("Demo")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_AGENDA, "agenda to make call"); + record1.AddKeyValue("$se_module", "Accounts"); + // log a Call + Com.Zoho.Crm.API.Record.Record whoId1 = new Com.Zoho.Crm.API.Record.Record(); + whoId1.Id = 4402481030088L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHO_ID, whoId1); + Com.Zoho.Crm.API.Record.Record whatId1 = new Com.Zoho.Crm.API.Record.Record(); + whatId1.Id = 440248884001L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHAT_ID, whatId1); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_TYPE, new Choice("Outbound")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.SUBJECT, "call"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_DURATION, "10:00"); + // record1.AddKeyValue("Voice_Recording__s", "recordingofcall.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.OUTGOING_CALL_STATUS, new Choice("Completed")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_START_TIME, new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_PURPOSE, new Choice("Demo")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_AGENDA, "agenda to make call"); + record1.AddKeyValue("Call_Result", new Choice("Not interested")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.DESCRIPTION, "desc"); + record1.AddKeyValue("$se_module", "Accounts"); + // + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729add280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35cca878a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user_1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user_1.Id = 440248254001L; + record1.AddKeyValue("User_1", user_1); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List> () {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Calls"; + CreateCall_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Campaigns.cs b/versions/3.0.0/Samples/Record/CreateRecords/Campaigns.cs new file mode 100644 index 0000000..2acbc52 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Campaigns.cs @@ -0,0 +1,204 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Campaigns + { + public static void CreateCampaigns_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.CAMPAIGN_NAME, "New Campaign"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.START_DATE, new DateTime(2023, 12, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.END_DATE, new DateTime(2023, 12, 20).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.NUM_SENT, 10L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.ACTUAL_COST, 100.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.EXPECTED_REVENUE, 200.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.TYPE, new Choice("Webinar")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.BUDGETED_COST, 120.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.EXPECTED_RESPONSE, 200L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.DESCRIPTION, "Description of campaign"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.STATUS, new Choice("Active")); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c60"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321be6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Campaigns"; + CreateCampaigns_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Cases.cs b/versions/3.0.0/Samples/Record/CreateRecords/Cases.cs new file mode 100644 index 0000000..6671013 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Cases.cs @@ -0,0 +1,217 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Cases + { + public static void CreateCases_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.SUBJECT, "new Case"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.TYPE, new Choice("Question")); + Com.Zoho.Crm.API.Record.Record product_name = new Com.Zoho.Crm.API.Record.Record(); + product_name.AddKeyValue("id", 32133465231321L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.PRODUCT_NAME, product_name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.CASE_ORIGIN, new Choice("Email")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.STATUS, new Choice("On Hold")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.REPORTED_BY, "none"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.PHONE, "31231242131"); + Com.Zoho.Crm.API.Record.Record contactName = new Com.Zoho.Crm.API.Record.Record(); + contactName.AddKeyValue("id", 3121012312232L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.RELATED_TO, contactName); + Com.Zoho.Crm.API.Record.Record accountName = new Com.Zoho.Crm.API.Record.Record(); + accountName.AddKeyValue("id", 3245633789213L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.ACCOUNT_NAME, accountName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.EMAIL, "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.PRIORITY, new Choice("Low")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.CASE_REASON, new Choice("New Problem")); + Com.Zoho.Crm.API.Record.Record dealName = new Com.Zoho.Crm.API.Record.Record(); + dealName.AddKeyValue("id", 392223423412L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.DEAL_NAME, dealName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.DESCRIPTION, "description of case"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.INTERNAL_COMMENTS, "comments"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.SOLUTION, "Solution for problem"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad8"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b52"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "cases"; + CreateCases_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Contacts.cs b/versions/3.0.0/Samples/Record/CreateRecords/Contacts.cs new file mode 100644 index 0000000..73578ce --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Contacts.cs @@ -0,0 +1,229 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Contacts + { + public static void CreateContacts_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.LAST_NAME, "Last Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.EMAIL, "abc@zoho.com"); + Com.Zoho.Crm.API.Record.Record accountname = new Com.Zoho.Crm.API.Record.Record(); + accountname.Id = 3213211322321323L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ACCOUNT_NAME, accountname); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.FIRST_NAME, "First Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.PHONE, "3323"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.TITLE, "Title"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.DEPARTMENT, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_PHONE, "12132"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.HOME_PHONE, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MOBILE, "4141"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.FAX, "fax"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.DATE_OF_BIRTH, new DateTime(2023, 12, 01).Date); + Com.Zoho.Crm.API.Record.Record vendorName = new Com.Zoho.Crm.API.Record.Record(); + vendorName.Id = 3121323L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.VENDOR_NAME, vendorName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.EMAIL_OPT_OUT, false); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.SECONDARY_EMAIL, "abc2@zoho.com"); + Com.Zoho.Crm.API.Record.Record contact = new Com.Zoho.Crm.API.Record.Record(); + contact.Id = 3322321323L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.REPORTING_TO, contact); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.SKYPE_ID, "skype_id"); + // Address info of Contact + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_ZIP, "zip"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_ZIP, "zip"); + // + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d9083d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Contacts"; + CreateContacts_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Deals.cs b/versions/3.0.0/Samples/Record/CreateRecords/Deals.cs new file mode 100644 index 0000000..93e029d --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Deals.cs @@ -0,0 +1,211 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Deals + { + public static void CreateDeals_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.DEAL_NAME, "deal_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.AMOUNT, 100.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.CLOSING_DATE, new DateTime(2023, 12, 12).Date); + Com.Zoho.Crm.API.Record.Record account = new Com.Zoho.Crm.API.Record.Record(); + account.Id = 31212001L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ACCOUNT_NAME, account); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.STAGE, new Choice("Qualification")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.PROBABILITY, 10); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.TYPE, new Choice("New Business")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.NEXT_STEP, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.LEAD_SOURCE, new Choice("Advertisement")); + Com.Zoho.Crm.API.Record.Record contactName = new Com.Zoho.Crm.API.Record.Record(); + contactName.Id = 40223200342313L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.CONTACT_NAME, contactName); + Com.Zoho.Crm.API.Record.Record compaign = new Com.Zoho.Crm.API.Record.Record(); + compaign.Id = 322311243223L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.CAMPAIGN_SOURCE, compaign); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b878a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Deals"; + CreateDeals_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Events.cs b/versions/3.0.0/Samples/Record/CreateRecords/Events.cs new file mode 100644 index 0000000..c50b17f --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Events.cs @@ -0,0 +1,230 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using Participants = Com.Zoho.Crm.API.Record.Participants; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using Reminder = Com.Zoho.Crm.API.Record.Reminder; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Events + { + public static void CreateEvents_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.DESCRIPTION, "Test Events"); + DateTimeOffset startDateTime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.START_DATETIME, startDateTime); + List participants = new List(); + Participants participant1 = new Participants(); + participant1.Email = "abc@zoho.com"; + participant1.Type = "email"; + participant1.Id = 4402481056002L; + participants.Add (participant1); + Participants participant2 = new Participants(); + participant2.AddKeyValue("participant", "34770617425"); + participant2.AddKeyValue("type", "lead"); + participants.Add (participant2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.PARTICIPANTS, participants); + record1.AddKeyValue("$send_notification", true); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.EVENT_TITLE, "New Automated Event"); + DateTimeOffset enddatetime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.END_DATETIME, enddatetime); + List reminderList = new List(); + Reminder remindAt1 = new Reminder(); + remindAt1.Period = "minutes"; + remindAt1.Unit = 15; + reminderList.Add (remindAt1); + remindAt1 = new Reminder(); + remindAt1.Period = "days"; + remindAt1.Unit = 1; + remindAt1.Time = "10.30"; + reminderList.Add (remindAt1); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.REMIND_AT, reminderList); + record1.AddKeyValue("$se_module", "Leads"); + Com.Zoho.Crm.API.Record.Record whatId1 = new Com.Zoho.Crm.API.Record.Record(); + whatId1.Id = 34770614381002L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.WHAT_ID, whatId1); + record1.AddKeyValue("Currency", new Choice("USD")); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d90b0bd280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4c4w519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + records.Add (record1); + bodyWrapper.Data = records; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Events"; + CreateEvents_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Invoices.cs b/versions/3.0.0/Samples/Record/CreateRecords/Invoices.cs new file mode 100644 index 0000000..0eaf1c4 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Invoices.cs @@ -0,0 +1,258 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Invoices + { + public static void CreateInvoices_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record accountname = new Com.Zoho.Crm.API.Record.Record(); + accountname.AddKeyValue("name", "automated"); + accountname.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ID, 440248884001L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.ACCOUNT_NAME, accountname); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.SUBJECT, "new invoice"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.ADJUSTMENT, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.INVOICE_DATE, new DateTime(2023, 10, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.DUE_DATE, new DateTime(2023, 12, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.SALES_COMMISSION, 20.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.PURCHASE_ORDER, "purchase order"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.EXCISE_DUTY, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.STATUS, new Choice("Created")); + Com.Zoho.Crm.API.Record.Record contactname = new Com.Zoho.Crm.API.Record.Record(); + contactname.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 347706111853001l); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.CONTACT_NAME, contactname); + Com.Zoho.Crm.API.Record.Record dealname = new Com.Zoho.Crm.API.Record.Record(); + dealname.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ID, 347706111383007l); + record1.AddKeyValue("Deal_Name__s", dealname); + Com.Zoho.Crm.API.Record.Record sales_order = new Com.Zoho.Crm.API.Record.Record(); + sales_order.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ID, 32203232899292L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.SALES_ORDER, sales_order); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.TERMS_AND_CONDITIONS, "details of terms and conditions"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.DESCRIPTION, "description"); + List inventoryLineItemList = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct = new LineItemProduct(); + lineItemProduct.Id = 4402480954344l; + // Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + // data.Id = 440248954344L; + inventoryLineItem.AddKeyValue("Description", "asd"); + inventoryLineItem.AddKeyValue("Discount", "5"); + inventoryLineItem.AddKeyValue("Quantity", 10.0); + inventoryLineItem.AddKeyValue("List_Price", 100.0); + inventoryLineItem.AddKeyValue("Product_Name", lineItemProduct); + // inventoryLineItem.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList.Add (inventoryLineItem); + List productLineTaxes = new List(); + LineTax productLineTax = new LineTax(); + productLineTax.Name = "Vat"; + productLineTax.Value = 10.0; + productLineTax.Id = 4402480020810l; + productLineTax.Percentage = 10.0; + productLineTaxes.Add (productLineTax); + inventoryLineItem.AddKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.Add (inventoryLineItem); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.INVOICED_ITEMS, inventoryLineItemList); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STREET, "shipping street"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab7c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa35c32e0063e7321b5b4ca878a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Invoices"; + CreateInvoices_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Leads.cs b/versions/3.0.0/Samples/Record/CreateRecords/Leads.cs new file mode 100644 index 0000000..3887f1a --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Leads.cs @@ -0,0 +1,220 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Leads + { + public static void CreateLeads_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LAST_NAME, "Last Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.FIRST_NAME, "First Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.COMPANY, "KKRNP"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.ANNUAL_REVENUE, 1221.2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LEAD_STATUS, new Choice("Not Contacted")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LEAD_SOURCE, new Choice("Advertisement")); + record1.AddKeyValue("Title", "titleName"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.PHONE, "11123"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.MOBILE, "200221"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.INDUSTRY, new Choice("ERP")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.EMAIL_OPT_OUT, true); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.EMAIL, "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.FAX, "fax"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.WEBSITE, "website.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.NO_OF_EMPLOYEES, 10); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.RATING, new Choice("Active")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.SKYPE_ID, "Skype123"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.SECONDARY_EMAIL, "abc1@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.TWITTER, "twitter55"); + // Address info of Lead + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.CITY, "City"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.ZIP_CODE, "501210"); + // + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 4402481103145L); + linkingRecord.AddKeyValue("MultiSelectLookup", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("MultiSelectLookup", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("CustomField", "Value"); + record1.AddKeyValue("Datetime", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d70b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c21b5b4ca878a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_1", data); + // // for Custom pickList + record1.AddKeyValue("Pick", new Choice("true")); + // // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + CreateLeads_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/PriceBooks.cs b/versions/3.0.0/Samples/Record/CreateRecords/PriceBooks.cs new file mode 100644 index 0000000..28aadef --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/PriceBooks.cs @@ -0,0 +1,209 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using PricingDetails = Com.Zoho.Crm.API.Record.PricingDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class PriceBooks + { + public static void CreatePriceBooks_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + List pricingDetails = new List(); + PricingDetails pricingDetail1 = new PricingDetails(); + pricingDetail1.FromRange = 1.0; + pricingDetail1.ToRange = 5.0; + pricingDetail1.Discount = 2.0; + pricingDetails.Add (pricingDetail1); + PricingDetails pricingDetail2 = new PricingDetails(); + pricingDetail2.AddKeyValue("from_range", 6.0); + pricingDetail2.AddKeyValue("to_range", 11.0); + pricingDetail2.AddKeyValue("discount", 3.0); + pricingDetails.Add (pricingDetail2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.PRICING_DETAILS, pricingDetails); + record1.AddKeyValue("Email", "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.DESCRIPTION, "TEST"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.PRICE_BOOK_NAME, "book_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.PRICING_MODEL, new Choice("Flat")); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248954344L); + linkingRecord.AddKeyValue("MultSL", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("MultSL", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a6ae23d729ad87c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c75cc2d9ab35c32e0063e7321b5b4ca878a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Price_Books"; + CreatePriceBooks_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Products.cs b/versions/3.0.0/Samples/Record/CreateRecords/Products.cs new file mode 100644 index 0000000..8781406 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Products.cs @@ -0,0 +1,224 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Products + { + public static void CreateProducts_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_NAME, "product_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_CODE, "product_code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_ACTIVE, true); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_CATEGORY, new Choice("Software")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SALES_END_DATE, new DateTime(2023, 12, 25).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SUPPORT_EXPIRY_DATE, new DateTime(2025, 12, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SALES_START_DATE, new DateTime(2023, 06, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SUPPORT_START_DATE, new DateTime(2023, 06, 20).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.MANUFACTURER, new Choice("MetBeat Corp.")); + Com.Zoho.Crm.API.Record.Record vendor = new Com.Zoho.Crm.API.Record.Record(); + vendor.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ID, 4402481054948L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.VENDOR_NAME, vendor); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.DESCRIPTION, "description of product"); + // price info of Product + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.UNIT_PRICE, 33.22); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.COMMISSION_RATE, 12.2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.TAXABLE, true); + List taxes = new List(); + Com.Zoho.Crm.API.Record.Tax tax = new Com.Zoho.Crm.API.Record.Tax(); + tax.Id = 440248020807L; + tax.Value = "15.0"; + record1.AddKeyValue("Tax", taxes); + // stock info of Product + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.USAGE_UNIT, new Choice("Box")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.QTY_IN_STOCK, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.QTY_IN_DEMAND, 5.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.QTY_ORDERED, 5.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.REORDER_LEVEL, 0.0); + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("Handler", user); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32a6ae23d729ad87c6d83d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7c1d6a5cc2d9ab35c32e0063e7321b5b4ca878a934519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user_1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user_1.Id = 440248254001L; + record1.AddKeyValue("User_1", user_1); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Products"; + CreateProducts_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/PurchaseOrders.cs b/versions/3.0.0/Samples/Record/CreateRecords/PurchaseOrders.cs new file mode 100644 index 0000000..c6da845 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/PurchaseOrders.cs @@ -0,0 +1,255 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class PurchaseOrders + { + public static void CreatePurchaseOrders_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record vendor = new Com.Zoho.Crm.API.Record.Record(); + vendor.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ID, 4402481054948L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.VENDOR_NAME, vendor); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.SUBJECT, "new order"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.ADJUSTMENT, 30.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.CARRIER, new Choice("FedEx")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.PO_DATE, new DateTime(2023, 9, 23).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.PO_NUMBER, "123123"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.EXCISE_DUTY, 25.0); + Com.Zoho.Crm.API.Record.Record vendor_name = new Com.Zoho.Crm.API.Record.Record(); + vendor_name.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ID, 3421423242421L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.VENDOR_NAME, vendor_name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.TRACKING_NUMBER, "42231"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.SALES_COMMISSION, 43.32); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.REQUISITION_NO, null); + Com.Zoho.Crm.API.Record.Record contact_Name = new Com.Zoho.Crm.API.Record.Record(); + contact_Name.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 342342322231L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.CONTACT_NAME, contact_Name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.DESCRIPTION, "description"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.TERMS_AND_CONDITIONS, "details of terms and condition"); + List inventoryLineItemList = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct = new LineItemProduct(); + lineItemProduct.Id = 4402480954344l; + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248954344L; + inventoryLineItem.AddKeyValue("Description", "asd"); + inventoryLineItem.AddKeyValue("Discount", "5"); + inventoryLineItem.AddKeyValue("Quantity", 10.0); + inventoryLineItem.AddKeyValue("List_Price", 100.0); + inventoryLineItem.AddKeyValue("Product_Name", lineItemProduct); + // inventoryLineItem.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList.Add (inventoryLineItem); + List productLineTaxes = new List(); + LineTax productLineTax = new LineTax(); + productLineTax.Name = "Vat"; + productLineTax.Value = 10.0; + productLineTax.Id = 4402480020810l; + productLineTax.Percentage = 15.0; + productLineTaxes.Add (productLineTax); + inventoryLineItem.AddKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.Add (inventoryLineItem); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.PURCHASE_ITEMS, inventoryLineItemList); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STREET, "shipping street"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data1 = new Com.Zoho.Crm.API.Record.Record(); + data1.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data1); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Purchase_Orders"; + CreatePurchaseOrders_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Quotes.cs b/versions/3.0.0/Samples/Record/CreateRecords/Quotes.cs new file mode 100644 index 0000000..ce58bc1 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Quotes.cs @@ -0,0 +1,253 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Quotes + { + public static void CreateQuotes_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record accountName = new Com.Zoho.Crm.API.Record.Record(); + accountName.AddKeyValue("name", "automated"); + accountName.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ID, 440248884001L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.ACCOUNT_NAME, accountName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SUBJECT, "new quote"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.ADJUSTMENT, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.VALID_TILL, new DateTime(2023, 12, 10).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.TEAM, "teamName"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.TERMS_AND_CONDITIONS, "details of terms and conditions"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.DESCRIPTION, "description"); + Com.Zoho.Crm.API.Record.Record dealName = new Com.Zoho.Crm.API.Record.Record(); + dealName.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ID, 347706111383007l); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.DEAL_NAME, dealName); + Com.Zoho.Crm.API.Record.Record contactName = new Com.Zoho.Crm.API.Record.Record(); + contactName.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 347706111853001l); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.CONTACT_NAME, contactName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.QUOTE_STAGE, new Choice("Draft")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.CARRIER, new Choice("FedEX")); + List inventoryLineItemList = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct = new LineItemProduct(); + lineItemProduct.Id = 44024800954344l; + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248954344L; + inventoryLineItem.AddKeyValue("Description", "asd"); + inventoryLineItem.AddKeyValue("Discount", "5"); + inventoryLineItem.AddKeyValue("Quantity", 10.0); + inventoryLineItem.AddKeyValue("List_Price", 100.0); + inventoryLineItem.AddKeyValue("Product_Name", lineItemProduct); + // inventoryLineItem.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList.Add (inventoryLineItem); + List productLineTaxes = new List(); + LineTax productLineTax = new LineTax(); + productLineTax.Name = "Vat"; + productLineTax.Value = 10.0; + productLineTax.Id = 44024800020810l; + productLineTax.Percentage = 10.0; + productLineTaxes.Add (productLineTax); + inventoryLineItem.AddKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.Add (inventoryLineItem); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.QUOTED_ITEMS, inventoryLineItemList); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STREET, "shipping street"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data1 = new Com.Zoho.Crm.API.Record.Record(); + data1.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data1); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Quotes"; + CreateQuotes_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/SalesOrders.cs b/versions/3.0.0/Samples/Record/CreateRecords/SalesOrders.cs new file mode 100644 index 0000000..0f35f02 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/SalesOrders.cs @@ -0,0 +1,260 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class SalesOrders + { + public static void CreateSalesOrders_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record account = new Com.Zoho.Crm.API.Record.Record(); + // account.AddKeyValue("name", "automated"); + account.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ID, 440248884001L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ACCOUNT_NAME, account); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SUBJECT, "new order"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ADJUSTMENT, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.DESCRIPTION, "description"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.TERMS_AND_CONDITIONS, "details of terms and conditions"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.CUSTOMER_NO, "123212211"); + Com.Zoho.Crm.API.Record.Record quoteName = new Com.Zoho.Crm.API.Record.Record(); + quoteName.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.ID, 329202323121L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.QUOTE_NAME, quoteName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.PENDING, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.CARRIER, new Choice("FedEx")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SALES_COMMISSION, 40.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.PURCHASE_ORDER, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.EXCISE_DUTY, 30.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.STATUS, new Choice("Created")); + Com.Zoho.Crm.API.Record.Record deal_name = new Com.Zoho.Crm.API.Record.Record(); + deal_name.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ID, 32124313234313L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.DEAL_NAME, deal_name); + Com.Zoho.Crm.API.Record.Record contact_name = new Com.Zoho.Crm.API.Record.Record(); + contact_name.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 323435332143342L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.CONTACT_NAME, contact_name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.DUE_DATE, new DateTime(2023, 12, 21).Date); + List inventoryLineItemList = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct = new LineItemProduct(); + lineItemProduct.Id = 440248954344L; + // Com.Zoho.Crm.API.record.Record data = new Com.Zoho.Crm.API.Record.Record(); + // data.Id = 440248954344L; + inventoryLineItem.AddKeyValue("Description", "asd"); + inventoryLineItem.AddKeyValue("Discount", "5"); + inventoryLineItem.AddKeyValue("Quantity", 10.0); + inventoryLineItem.AddKeyValue("List_Price", 100.0); + inventoryLineItem.AddKeyValue("Product_Name", lineItemProduct); + // inventoryLineItem.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList.Add (inventoryLineItem); + List productLineTaxes = new List(); + LineTax productLineTax = new LineTax(); + productLineTax.Name = "MyTax1134"; + productLineTax.Value = 0.0; + productLineTax.Id = 347706110743003l; + productLineTax.Percentage = 15.0; + productLineTaxes.Add (productLineTax); + inventoryLineItem.AddKeyValue("Line_Tax", productLineTaxes); + inventoryLineItemList.Add (inventoryLineItem); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ORDERED_ITEMS, inventoryLineItemList); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STREET, "shipping street"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Sales_Orders"; + CreateSalesOrders_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Solutions.cs b/versions/3.0.0/Samples/Record/CreateRecords/Solutions.cs new file mode 100644 index 0000000..82a1494 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Solutions.cs @@ -0,0 +1,200 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Solutions + { + public static void CreateSolutions_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.SOLUTION_TITLE, "new Solution"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.STATUS, new Choice("Draft")); + Com.Zoho.Crm.API.Record.Record product = new Com.Zoho.Crm.API.Record.Record(); + product.Id = 345603456404533L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.PRODUCT_NAME, product); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.QUESTION, "question?"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.ANSWER, "answer"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Solutions"; + CreateSolutions_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Tasks.cs b/versions/3.0.0/Samples/Record/CreateRecords/Tasks.cs new file mode 100644 index 0000000..478ccee --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Tasks.cs @@ -0,0 +1,214 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using RecurringActivity = Com.Zoho.Crm.API.Record.RecurringActivity; +using RemindAt = Com.Zoho.Crm.API.Record.RemindAt; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Tasks + { + public static void CreateTask_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.DESCRIPTION, "Test Task"); + record1.AddKeyValue("Rupee", new Choice("INR")); + RemindAt remindAt = new RemindAt(); + remindAt.Alarm = "ACTION=EMAILANDPOPUP;TRIGGER=DATE-TIME:2023-07-03T12:30:00+05:30"; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.REMIND_AT, remindAt); + Com.Zoho.Crm.API.Record.Record whoId = new Com.Zoho.Crm.API.Record.Record(); + whoId.Id = 440248774074L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.WHO_ID, whoId); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.STATUS, new Choice("Not Started")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.DUE_DATE, new DateTime(2023, 12, 13).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.PRIORITY, new Choice("Low")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.SUBJECT, "Email1"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.SEND_NOTIFICATION_EMAIL, false); + record1.AddKeyValue("$se_module", "Leads"); + Com.Zoho.Crm.API.Record.Record whatId = new Com.Zoho.Crm.API.Record.Record(); + whatId.Id = 440248774074L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.WHAT_ID, whatId); + /** Recurring Activity can be provided in any activity module */ + RecurringActivity recurringActivity = new RecurringActivity(); + recurringActivity.Rrule = "FREQ=DAILY;INTERVAL=10;UNTIL=2023-08-14;DTSTART=2023-07-03"; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.RECURRING_ACTIVITY, recurringActivity); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Tasks"; + CreateTask_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/CreateRecords/Vendors.cs b/versions/3.0.0/Samples/Record/CreateRecords/Vendors.cs new file mode 100644 index 0000000..8083366 --- /dev/null +++ b/versions/3.0.0/Samples/Record/CreateRecords/Vendors.cs @@ -0,0 +1,205 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.CreateRecords +{ + public class Vendors + { + public static void CreateVendors_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.VENDOR_NAME, "vendor_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.PHONE, "12343213"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.EMAIL, "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.WEBSITE, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.GL_ACCOUNT, new Choice("Sales-Software")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.CATEGORY, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ZIP_CODE, "zipcode"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.CreateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Vendors"; + CreateVendors_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/GetRecord.cs b/versions/3.0.0/Samples/Record/GetRecord.cs new file mode 100644 index 0000000..7309737 --- /dev/null +++ b/versions/3.0.0/Samples/Record/GetRecord.cs @@ -0,0 +1,413 @@ +using System; +using System.Reflection; +using System.IO; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Attachment = Com.Zoho.Crm.API.Attachments.Attachment; +using ParentId = Com.Zoho.Crm.API.Attachments.ParentId; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using Comment = Com.Zoho.Crm.API.Record.Comment; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileBodyWrapper = Com.Zoho.Crm.API.Record.FileBodyWrapper; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using ImageUpload = Com.Zoho.Crm.API.Record.ImageUpload; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using PricingDetails = Com.Zoho.Crm.API.Record.PricingDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using RecurringActivity = Com.Zoho.Crm.API.Record.RecurringActivity; +using RemindAt = Com.Zoho.Crm.API.Record.RemindAt; +using ResponseHandler = Com.Zoho.Crm.API.Record.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.Record.ResponseWrapper; +using Tax = Com.Zoho.Crm.API.Record.Tax; +using GetRecordHeader = Com.Zoho.Crm.API.Record.RecordOperations.GetRecordHeader; +using GetRecordParam = Com.Zoho.Crm.API.Record.RecordOperations.GetRecordParam; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using MinifiedUser = Com.Zoho.Crm.API.Users.MinifiedUser; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; +using System.Collections; + +namespace Samples.Record +{ + public class GetRecord + { + public static void GetRecord_1(string moduleAPIName, long recordId, string destinationFolder) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + ParameterMap paramInstance = new ParameterMap(); + //paramInstance.Add(GetRecordParam.APPROVED, "both"); + //paramInstance.Add(GetRecordParam.CONVERTED, "false"); + //List fieldNames = new List() { "Company", "Email" }; + //paramInstance.Add(GetRecordParam.FIELDS, string.Join(",", fieldNames)); + //DateTimeOffset startdatetime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + //paramInstance.Add(GetRecordParam.STARTDATETIME, startdatetime); + //DateTimeOffset enddatetime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + //paramInstance.Add(GetRecordParam.ENDDATETIME, enddatetime); + //paramInstance.Add(GetRecordParam.TERRITORY_ID, "34770613051357"); + //paramInstance.Add(GetRecordParam.INCLUDE_CHILD, "true"); + HeaderMap headerInstance = new HeaderMap(); + //DateTimeOffset ifmodifiedsince = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + //headerInstance.Add(GetRecordHeader.IF_MODIFIED_SINCE, ifmodifiedsince); + //headerInstance.Add(GetRecordHeader.X_EXTERNAL, "Leads.External"); + APIResponse response = recordOperations.GetRecord(recordId, paramInstance, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List records = responseWrapper.Data; + foreach (Com.Zoho.Crm.API.Record.Record record in records) + { + Console.WriteLine ("Record ID: " + record.Id); + Com.Zoho.Crm.API.Users.MinifiedUser createdBy = record.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Record Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Record Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Record Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Record CreatedTime: " + record.CreatedTime); + Com.Zoho.Crm.API.Users.MinifiedUser modifiedBy = record.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Record Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Record Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Record Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Record ModifiedTime: " + record.ModifiedTime); + List tags = record.Tag; + if (tags != null) + { + foreach (Tag tag in tags) + { + Console.WriteLine ("Record Tag Name: " + tag.Name); + Console.WriteLine ("Record Tag ID: " + tag.Id); + } + } + // To get particular field value + Console.WriteLine ("Record Field Value: " + record.GetKeyValue("Last_Name")); + Console.WriteLine ("Record KeyValues: "); + foreach (KeyValuePair entry in record.GetKeyValues()) + { + string keyName = entry.Key; + object value = entry.Value; + if(value == null) + { + continue; + } + if (value is IList) + { + IList dataList = (IList) value; + if (dataList.Count > 0) + { + if (dataList[0] is FileDetails) + { + List fileDetails = (List) value; + foreach (FileDetails fileDetail in fileDetails) + { + Console.WriteLine ("Record FileDetails FileIds: " + fileDetail.FileIdS); + Console.WriteLine ("Record FileDetails FileNameS: " + fileDetail.FileNameS); + Console.WriteLine ("Record FileDetails SizeS: " + fileDetail.SizeS); + Console.WriteLine ("Record FileDetails Id: " + fileDetail.Id); + } + } + else if (dataList[0].GetType().FullName.Contains("Choice")) + { + Console.WriteLine(keyName); + Console.WriteLine("values"); + foreach (object choice in dataList) + { + Type type = choice.GetType(); + PropertyInfo prop = type.GetProperty("Value"); + Console.WriteLine(prop.GetValue(choice)); + } + } + else if (dataList[0] is ImageUpload) + { + List imageUploads = (List) dataList; + foreach (ImageUpload imageUpload in imageUploads) + { + Console.WriteLine ("Record Description: " + imageUpload.DescriptionS); + Console.WriteLine ("Record FileIds: " + imageUpload.FileIdS); + Console.WriteLine ("Record FileNameS: " + imageUpload.FileNameS); + Console.WriteLine ("Record PreviewIdS: " + imageUpload.PreviewIdS); + Console.WriteLine ("Record SizeS: " + imageUpload.SizeS); + Console.WriteLine ("Record States: " + imageUpload.StateS); + Console.WriteLine ("Record ID: " + imageUpload.Id); + Console.WriteLine ("Record SequenceNumber: " + imageUpload.SequenceNumberS); + } + } + else if (dataList[0] is Tax) + { + Tax tax = (Tax) dataList[0]; + Console.WriteLine ("Record Tax id: " + tax.Id); + Console.WriteLine ("Record Tax value: " + tax.Value); + } + else if (dataList[0] is Tag) + { + List tagList = (List) value; + foreach (Tag tag in tagList) + { + Console.WriteLine ("Record Tag Name: " + tag.Name); + Console.WriteLine ("Record Tag ID: " + tag.Id); + } + } + else if (dataList[0] is PricingDetails) + { + List pricingDetails = (List) value; + foreach (PricingDetails pricingDetail in pricingDetails) + { + Console.WriteLine ("Record PricingDetails ToRange: " + pricingDetail.ToRange); + Console.WriteLine ("Record PricingDetails Discount: " + pricingDetail.Discount); + Console.WriteLine ("Record PricingDetails ID: " + pricingDetail.Id); + Console.WriteLine ("Record PricingDetails FromRange: " + pricingDetail.FromRange); + } + } + else if (dataList[0] is Com.Zoho.Crm.API.Record.Record) + { + List recordList = (List) dataList; + foreach (Com.Zoho.Crm.API.Record.Record record1 in recordList) + { + foreach (KeyValuePair entry1 in record1.GetKeyValues()) + { + Console.WriteLine (entry1.Key + ": " + entry1.Value); + } + } + } + else if (dataList[0] is LineTax) + { + List lineTaxes = (List) dataList; + foreach (LineTax lineTax in lineTaxes) + { + Console.WriteLine ("Record ProductDetails LineTax Percentage: " + lineTax.Percentage); + Console.WriteLine ("Record ProductDetails LineTax Name: " + lineTax.Name); + Console.WriteLine ("Record ProductDetails LineTax Id: " + lineTax.Id); + Console.WriteLine ("Record ProductDetails LineTax Value: " + lineTax.Value); + } + } + else if (dataList[0] is Comment) + { + List comments = (List) dataList; + foreach (Comment comment in comments) + { + Console.WriteLine ("Record Comment CommentedBy: " + comment.CommentedBy); + Console.WriteLine ("Record Comment CommentedTime: " + comment.CommentedTime); + Console.WriteLine ("Record Comment CommentContent: " + comment.CommentContent); + Console.WriteLine ("Record Comment Id: " + comment.Id); + } + } + else if (dataList[0] is Attachment) + { + List attachments = (List) dataList; + foreach (Com.Zoho.Crm.API.Attachments.Attachment attachment in attachments) + { + Com.Zoho.Crm.API.Users.MinifiedUser owner = attachment.Owner; + if (owner != null) + { + Console.WriteLine ("Record Attachment Owner User-Name: " + owner.Name); + Console.WriteLine ("Record Attachment Owner User-ID: " + owner.Id); + Console.WriteLine ("Record Attachment Owner User-Email: " + owner.Email); + } + Console.WriteLine ("Record Attachment Modified Time: " + attachment.ModifiedTime); + Console.WriteLine ("Record Attachment File Name: " + attachment.FileName); + Console.WriteLine ("Record Attachment Created Time: " + attachment.CreatedTime); + Console.WriteLine ("Record Attachment File Size: " + attachment.Size); + ParentId parentId = attachment.ParentId; + if (parentId != null) + { + Console.WriteLine ("Record Attachment parent record Name: " + parentId.Name); + Console.WriteLine ("Record Attachment parent record ID: " + parentId.Id); + } + Console.WriteLine ("Record Attachment is Editable: " + attachment.Editable); + Console.WriteLine ("Record Attachment File ID: " + attachment.FileId); + Console.WriteLine ("Record Attachment File Type: " + attachment.Type); + Console.WriteLine ("Record Attachment seModule: " + attachment.SeModule); + modifiedBy = attachment.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Record Attachment Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Record Attachment Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Record Attachment Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Record Attachment State: " + attachment.State); + Console.WriteLine ("Record Attachment ID: " + attachment.Id); + createdBy = attachment.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Record Attachment Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Record Attachment Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Record Attachment Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Record Attachment LinkUrl: " + attachment.LinkUrl); + } + } + else + { + Console.WriteLine (keyName + ": " + value); + } + } + } + else if (value is Com.Zoho.Crm.API.Record.Record) + { + Com.Zoho.Crm.API.Record.Record recordValue = (Com.Zoho.Crm.API.Record.Record) value; + Console.WriteLine ("Record " + keyName + " ID: " + recordValue.Id); + Console.WriteLine ("Record " + keyName + " Name: " + recordValue.GetKeyValue("name")); + } + else if (value is Com.Zoho.Crm.API.Layouts.Layouts) + { + Com.Zoho.Crm.API.Layouts.Layouts layout = (Com.Zoho.Crm.API.Layouts.Layouts) value; + if (layout != null) + { + Console.WriteLine ("Record " + keyName + " ID: " + layout.Id); + Console.WriteLine ("Record " + keyName + " Name: " + layout.Name); + } + } + else if (value is MinifiedUser) + { + Com.Zoho.Crm.API.Users.MinifiedUser user = (MinifiedUser) value; + if (user != null) + { + Console.WriteLine ("Record " + keyName + " User-ID: " + user.Id); + Console.WriteLine ("Record " + keyName + " User-Name: " + user.Name); + Console.WriteLine ("Record " + keyName + " User-Email: " + user.Email); + } + } + else if (value.GetType().FullName.Contains("Choice")) + { + Type type = value.GetType(); + PropertyInfo prop = type.GetProperty("Value"); + Console.WriteLine(keyName + ": " + prop.GetValue(value)); + } + else if (value is RemindAt) + { + Console.WriteLine (keyName + ": " + ((RemindAt) value).Alarm); + } + else if (value is RecurringActivity) + { + Console.WriteLine (keyName); + Console.WriteLine ("RRULE" + ": " + ((RecurringActivity) value).Rrule); + } + else if (value is Consent) + { + Consent consent = (Consent) value; + Console.WriteLine ("Record Consent ID: " + consent.Id); + MinifiedUser owner = consent.Owner; + if (owner != null) + { + Console.WriteLine ("Record Consent Owner Name: " + owner.Name); + Console.WriteLine ("Record Consent Owner ID: " + owner.Id); + Console.WriteLine ("Record Consent Owner Email: " + owner.Email); + } + MinifiedUser consentCreatedBy = consent.CreatedBy; + if (consentCreatedBy != null) + { + Console.WriteLine ("Record Consent CreatedBy Name: " + consentCreatedBy.Name); + Console.WriteLine ("Record Consent CreatedBy ID: " + consentCreatedBy.Id); + Console.WriteLine ("Record Consent CreatedBy Email: " + consentCreatedBy.Email); + } + MinifiedUser consentModifiedBy = consent.ModifiedBy; + if (consentModifiedBy != null) + { + Console.WriteLine ("Record Consent ModifiedBy Name: " + consentModifiedBy.Name); + Console.WriteLine ("Record Consent ModifiedBy ID: " + consentModifiedBy.Id); + Console.WriteLine ("Record Consent ModifiedBy Email: " + consentModifiedBy.Email); + } + Console.WriteLine ("Record Consent CreatedTime: " + consent.CreatedTime); + Console.WriteLine ("Record Consent ModifiedTime: " + consent.ModifiedTime); + Console.WriteLine ("Record Consent ContactThroughEmail: " + consent.ContactThroughEmail); + Console.WriteLine ("Record Consent ContactThroughSocial: " + consent.ContactThroughSocial); + Console.WriteLine ("Record Consent ContactThroughSurvey: " + consent.ContactThroughSurvey); + Console.WriteLine ("Record Consent ContactThroughPhone: " + consent.ContactThroughPhone); + Console.WriteLine ("Record Consent MailSentTime: " + consent.MailSentTime); + Console.WriteLine ("Record Consent ConsentDate: " + consent.ConsentDate); + Console.WriteLine ("Record Consent ConsentRemarks: " + consent.ConsentRemarks); + Console.WriteLine ("Record Consent ConsentThrough: " + consent.ConsentThrough); + Console.WriteLine ("Record Consent DataProcessingBasis: " + consent.DataProcessingBasis); + // To get custom values + Console.WriteLine ("Record Consent Lawful Reason: " + consent.GetKeyValue("Lawful_Reason")); + } + else + { + Console.WriteLine (keyName + ": " + value); + } + } + } + } + else if (responseHandler is FileBodyWrapper) + { + FileBodyWrapper fileBodyWrapper = (FileBodyWrapper)responseHandler; + StreamWrapper streamWrapper = fileBodyWrapper.File; + Stream file = streamWrapper.Stream; + string fullFilePath = Path.Combine(destinationFolder, streamWrapper.Name); + using (FileStream outputFileStream = new FileStream(fullFilePath, FileMode.Create)) + { + file.CopyTo(outputFileStream); + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + long recordId = 44024000774074l; + string destinationFolder = "/Users/zohocrm-csharp-sdk-sample/file"; + GetRecord_1(moduleAPIName, recordId, destinationFolder); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/GetRecords.cs b/versions/3.0.0/Samples/Record/GetRecords.cs new file mode 100644 index 0000000..07cac00 --- /dev/null +++ b/versions/3.0.0/Samples/Record/GetRecords.cs @@ -0,0 +1,441 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Attachment = Com.Zoho.Crm.API.Attachments.Attachment; +using ParentId = Com.Zoho.Crm.API.Attachments.ParentId; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using Comment = Com.Zoho.Crm.API.Record.Comment; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using ImageUpload = Com.Zoho.Crm.API.Record.ImageUpload; +using Info = Com.Zoho.Crm.API.Record.Info; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using Participants = Com.Zoho.Crm.API.Record.Participants; +using PricingDetails = Com.Zoho.Crm.API.Record.PricingDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using RecurringActivity = Com.Zoho.Crm.API.Record.RecurringActivity; +using RemindAt = Com.Zoho.Crm.API.Record.RemindAt; +using ResponseHandler = Com.Zoho.Crm.API.Record.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.Record.ResponseWrapper; +using Tax = Com.Zoho.Crm.API.Record.Tax; +using GetRecordsHeader = Com.Zoho.Crm.API.Record.RecordOperations.GetRecordsHeader; +using GetRecordsParam = Com.Zoho.Crm.API.Record.RecordOperations.GetRecordsParam; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using MinifiedUser = Com.Zoho.Crm.API.Users.MinifiedUser; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; +using System.Collections; + +namespace Samples.Record +{ + public class GetRecords + { + public static void GetRecords_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + ParameterMap paramInstance = new ParameterMap(); + //paramInstance.Add (GetRecordsParam.APPROVED, "both"); + //paramInstance.Add(GetRecordsParam.CONVERTED, "both"); + //paramInstance.Add(GetRecordsParam.CVID, "3477061087501"); + //List ids = new List() { "3477148002" }; + //paramInstance.Add(GetRecordsParam.IDS, string.Join(",", ids)); + //paramInstance.Add (GetRecordsParam.UID, "34770615181008"); + List fieldNames = new List() { "Company", "Email" }; + paramInstance.Add(GetRecordsParam.FIELDS, string.Join(",", fieldNames)); + //paramInstance.Add(GetRecordsParam.SORT_BY, "Email"); + //paramInstance.Add(GetRecordsParam.SORT_ORDER, "desc"); + //paramInstance.Add(GetRecordsParam.PAGE, 1); + //paramInstance.Add(GetRecordsParam.PER_PAGE, 1); + //DateTimeOffset startdatetime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + //paramInstance.Add(GetRecordsParam.STARTDATETIME, startdatetime); + //DateTimeOffset enddatetime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + //paramInstance.Add(GetRecordsParam.ENDDATETIME, enddatetime); + //paramInstance.Add(GetRecordsParam.TERRITORY_ID, "34770613051357"); + //paramInstance.Add(GetRecordsParam.INCLUDE_CHILD, "true"); + HeaderMap headerInstance = new HeaderMap(); + //DateTimeOffset ifmodifiedsince = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + //headerInstance.Add (GetRecordsHeader.IF_MODIFIED_SINCE, ifmodifiedsince); + //headerInstance.Add(GetRecordsHeader.X_EXTERNAL, "Leads.External"); + APIResponse response = recordOperations.GetRecords(paramInstance, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List records = responseWrapper.Data; + foreach (Com.Zoho.Crm.API.Record.Record record in records) + { + Console.WriteLine ("Record ID: " + record.Id); + Com.Zoho.Crm.API.Users.MinifiedUser createdBy = record.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Record Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Record Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Record Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Record CreatedTime: " + record.CreatedTime); + Com.Zoho.Crm.API.Users.MinifiedUser modifiedBy = record.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Record Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Record Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Record Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Record ModifiedTime: " + record.ModifiedTime); + List tags = record.Tag; + if (tags != null) + { + foreach (Tag tag in tags) + { + Console.WriteLine ("Record Tag Name: " + tag.Name); + Console.WriteLine ("Record Tag ID: " + tag.Id); + } + } + // To get particular field value + Console.WriteLine ("Record Field Value: " + record.GetKeyValue("Last_Name"));// FieldApiName + Console.WriteLine ("Record KeyValues: "); + foreach (KeyValuePair entry in record.GetKeyValues()) + { + string keyName = entry.Key; + object value = entry.Value; + if(value == null) + { + continue; + } + if (value is IList) + { + IList dataList = (IList) value; + if (dataList.Count > 0) + { + if (dataList[0] is FileDetails) + { + List fileDetails = (List) value; + foreach (FileDetails fileDetail in fileDetails) + { + Console.WriteLine ("Record FileDetails FileIds: " + fileDetail.FileIdS); + Console.WriteLine ("Record FileDetails FileNameS: " + fileDetail.FileNameS); + Console.WriteLine ("Record FileDetails SizeS: " + fileDetail.SizeS); + Console.WriteLine ("Record FileDetails Id: " + fileDetail.Id); + } + } + else if (dataList[0] is ImageUpload) + { + List imageUploads = (List) dataList; + foreach (ImageUpload imageUpload in imageUploads) + { + Console.WriteLine ("Record Description: " + imageUpload.DescriptionS); + Console.WriteLine ("Record FileIds: " + imageUpload.FileIdS); + Console.WriteLine ("Record FileNameS: " + imageUpload.FileNameS); + Console.WriteLine ("Record PreviewIdS: " + imageUpload.PreviewIdS); + Console.WriteLine ("Record SizeS: " + imageUpload.SizeS); + Console.WriteLine ("Record States: " + imageUpload.StateS); + Console.WriteLine ("Record ID: " + imageUpload.Id); + Console.WriteLine ("Record SequenceNumber: " + imageUpload.SequenceNumberS); + } + } + else if (dataList[0] is Tax) + { + Tax tax = (Tax) dataList[0]; + Console.WriteLine ("Record Tax id: " + tax.Id); + Console.WriteLine ("Record Tax value: " + tax.Value); + } + else if (dataList[0] is Tag) + { + List tagList = (List) value; + foreach (Tag tag in tagList) + { + Console.WriteLine ("Record Tag Name: " + tag.Name); + Console.WriteLine ("Record Tag ID: " + tag.Id); + } + } + else if (dataList[0] is PricingDetails) + { + List pricingDetails = (List) value; + foreach (PricingDetails pricingDetail in pricingDetails) + { + Console.WriteLine ("Record PricingDetails ToRange: " + pricingDetail.ToRange); + Console.WriteLine ("Record PricingDetails Discount: " + pricingDetail.Discount); + Console.WriteLine ("Record PricingDetails ID: " + pricingDetail.Id); + Console.WriteLine ("Record PricingDetails FromRange: " + pricingDetail.FromRange); + } + } + else if (dataList[0] is Participants) + { + List participants = (List) value; + foreach (Participants participant in participants) + { + Console.WriteLine ("Record Participants Name: " + participant.Name); + Console.WriteLine ("Record Participants Invited: " + participant.Invited); + Console.WriteLine ("Record Participants ID: " + participant.Id); + Console.WriteLine ("Record Participants Type: " + participant.Type); + Console.WriteLine ("Record Participants Participant: " + participant.Participant); + Console.WriteLine ("Record Participants Status: " + participant.Status); + } + } + else if (dataList[0] is Com.Zoho.Crm.API.Record.Record) + { + List recordList = (List) dataList; + foreach (Com.Zoho.Crm.API.Record.Record record1 in recordList) + { + foreach (KeyValuePair entry1 in record1.GetKeyValues()) + { + Console.WriteLine (entry1.Key + ": " + entry1.Value); + } + } + } + else if (dataList[0] is LineTax) + { + List lineTaxes = (List) dataList; + foreach (LineTax lineTax in lineTaxes) + { + Console.WriteLine ("Record ProductDetails LineTax Percentage: " + lineTax.Percentage); + Console.WriteLine ("Record ProductDetails LineTax Name: " + lineTax.Name); + Console.WriteLine ("Record ProductDetails LineTax Id: " + lineTax.Id); + Console.WriteLine ("Record ProductDetails LineTax Value: " + lineTax.Value); + } + } + else if (dataList[0].GetType().FullName.Contains("Choice")) + { + Console.WriteLine(keyName); + Console.WriteLine("values"); + foreach (object choice in dataList) + { + Type type = choice.GetType(); + PropertyInfo prop = type.GetProperty("Value"); + Console.WriteLine(prop.GetValue(choice)); + } + } + else if (dataList[0] is Comment) + { + List comments = (List) dataList; + foreach (Comment comment in comments) + { + Console.WriteLine ("Record Comment CommentedBy: " + comment.CommentedBy); + Console.WriteLine ("Record Comment CommentedTime: " + comment.CommentedTime); + Console.WriteLine ("Record Comment CommentContent: " + comment.CommentContent); + Console.WriteLine ("Record Comment Id: " + comment.Id); + } + } + else if (dataList[0] is Attachment) + { + List attachments = (List) dataList; + foreach (Com.Zoho.Crm.API.Attachments.Attachment attachment in attachments) + { + Com.Zoho.Crm.API.Users.MinifiedUser owner = attachment.Owner; + if (owner != null) + { + Console.WriteLine ("Record Attachment Owner User-Name: " + owner.Name); + Console.WriteLine ("Record Attachment Owner User-ID: " + owner.Id); + Console.WriteLine ("Record Attachment Owner User-Email: " + owner.Email); + } + Console.WriteLine ("Record Attachment Modified Time: " + attachment.ModifiedTime); + Console.WriteLine ("Record Attachment File Name: " + attachment.FileName); + Console.WriteLine ("Record Attachment Created Time: " + attachment.CreatedTime); + Console.WriteLine ("Record Attachment File Size: " + attachment.Size); + ParentId parentId = attachment.ParentId; + if (parentId != null) + { + Console.WriteLine ("Record Attachment parent record Name: " + parentId.Name); + Console.WriteLine ("Record Attachment parent record ID: " + parentId.Id); + } + Console.WriteLine ("Record Attachment is Editable: " + attachment.Editable); + Console.WriteLine ("Record Attachment File ID: " + attachment.FileId); + Console.WriteLine ("Record Attachment File Type: " + attachment.Type); + Console.WriteLine ("Record Attachment seModule: " + attachment.SeModule); + modifiedBy = attachment.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("Record Attachment Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("Record Attachment Modified By User-ID: " + modifiedBy.Id); + Console.WriteLine ("Record Attachment Modified By User-Email: " + modifiedBy.Email); + } + Console.WriteLine ("Record Attachment State: " + attachment.State); + Console.WriteLine ("Record Attachment ID: " + attachment.Id); + createdBy = attachment.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("Record Attachment Created By User-Name: " + createdBy.Name); + Console.WriteLine ("Record Attachment Created By User-ID: " + createdBy.Id); + Console.WriteLine ("Record Attachment Created By User-Email: " + createdBy.Email); + } + Console.WriteLine ("Record Attachment LinkUrl: " + attachment.LinkUrl); + } + } + else + { + Console.WriteLine (keyName + ": " + value); + } + } + } + else if (value is Com.Zoho.Crm.API.Layouts.Layouts) + { + Com.Zoho.Crm.API.Layouts.Layouts layout = (Com.Zoho.Crm.API.Layouts.Layouts) value; + if (layout != null) + { + Console.WriteLine ("Record " + keyName + " ID: " + layout.Id); + Console.WriteLine ("Record " + keyName + " Name: " + layout.Name); + } + } + else if (value is MinifiedUser) + { + Com.Zoho.Crm.API.Users.MinifiedUser user = (MinifiedUser) value; + if (user != null) + { + Console.WriteLine ("Record " + keyName + " User-ID: " + user.Id); + Console.WriteLine ("Record " + keyName + " User-Name: " + user.Name); + Console.WriteLine ("Record " + keyName + " User-Email: " + user.Email); + } + } + else if (value is Com.Zoho.Crm.API.Record.Record) + { + Com.Zoho.Crm.API.Record.Record recordValue = (Com.Zoho.Crm.API.Record.Record) value; + Console.WriteLine ("Record " + keyName + " ID: " + recordValue.Id); + Console.WriteLine ("Record " + keyName + " Name: " + recordValue.GetKeyValue("name")); + } + else if (value.GetType().FullName.Contains("Choice")) + { + Type type = value.GetType(); + PropertyInfo prop = type.GetProperty("Value"); + Console.WriteLine(keyName + ": " + prop.GetValue(value)); + } + else if (value is RemindAt) + { + Console.WriteLine (keyName + ": " + ((RemindAt) value).Alarm); + } + else if (value is RecurringActivity) + { + Console.WriteLine (keyName); + Console.WriteLine ("RRULE" + ": " + ((RecurringActivity) value).Rrule); + } + else if (value is Consent) + { + Consent consent = (Consent) value; + Console.WriteLine ("Record Consent ID: " + consent.Id); + MinifiedUser owner = consent.Owner; + if (owner != null) + { + Console.WriteLine ("Record Consent Owner Name: " + owner.Name); + Console.WriteLine ("Record Consent Owner ID: " + owner.Id); + Console.WriteLine ("Record Consent Owner Email: " + owner.Email); + } + MinifiedUser consentCreatedBy = consent.CreatedBy; + if (consentCreatedBy != null) + { + Console.WriteLine ("Record Consent CreatedBy Name: " + consentCreatedBy.Name); + Console.WriteLine ("Record Consent CreatedBy ID: " + consentCreatedBy.Id); + Console.WriteLine ("Record Consent CreatedBy Email: " + consentCreatedBy.Email); + } + MinifiedUser consentModifiedBy = consent.ModifiedBy; + if (consentModifiedBy != null) + { + Console.WriteLine ("Record Consent ModifiedBy Name: " + consentModifiedBy.Name); + Console.WriteLine ("Record Consent ModifiedBy ID: " + consentModifiedBy.Id); + Console.WriteLine ("Record Consent ModifiedBy Email: " + consentModifiedBy.Email); + } + Console.WriteLine ("Record Consent CreatedTime: " + consent.CreatedTime); + Console.WriteLine ("Record Consent ModifiedTime: " + consent.ModifiedTime); + Console.WriteLine ("Record Consent ContactThroughEmail: " + consent.ContactThroughEmail); + Console.WriteLine ("Record Consent ContactThroughSocial: " + consent.ContactThroughSocial); + Console.WriteLine ("Record Consent ContactThroughSurvey: " + consent.ContactThroughSurvey); + Console.WriteLine ("Record Consent ContactThroughPhone: " + consent.ContactThroughPhone); + Console.WriteLine ("Record Consent MailSentTime: " + consent.MailSentTime); + Console.WriteLine ("Record Consent ConsentDate: " + consent.ConsentDate); + Console.WriteLine ("Record Consent ConsentRemarks: " + consent.ConsentRemarks); + Console.WriteLine ("Record Consent ConsentThrough: " + consent.ConsentThrough); + Console.WriteLine ("Record Consent DataProcessingBasis: " + consent.DataProcessingBasis); + // To get custom values + Console.WriteLine ("Record Consent Lawful Reason: " + consent.GetKeyValue("Lawful_Reason")); + } + else + { + Console.WriteLine (keyName + ": " + value); + } + } + } + Info info = responseWrapper.Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine ("Record Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine ("Record Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine ("Record Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine ("Record Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + GetRecords_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Accounts.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Accounts.cs new file mode 100644 index 0000000..98de568 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Accounts.cs @@ -0,0 +1,229 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Accounts + { + public static void UpdateAccounts_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + // set the Id of the record which you want to update + record1.Id = 32012047321334L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_NAME, "new Account"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.RATING, new Choice("Active")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.PHONE, "111111"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_SITE, "www.account.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.FAX, "fax"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.WEBSITE, null); + Com.Zoho.Crm.API.Record.Record parentAccount = new Com.Zoho.Crm.API.Record.Record(); + parentAccount.Id = 423094304333L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.PARENT_ACCOUNT, parentAccount); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_NUMBER, 121121L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ACCOUNT_TYPE, new Choice("Customer")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ANNUAL_REVENUE, 2121.1); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.EMPLOYEES, 100); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.INDUSTRY, new Choice("Technology")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SIC_CODE, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.OWNERSHIP, new Choice("Private")); + // Address info of Account + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.SHIPPING_STREET, "shipping street"); + // + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa4189ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec14ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can add update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 3452320103L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Accounts"; + UpdateAccounts_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Calls.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Calls.cs new file mode 100644 index 0000000..fe715ba --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Calls.cs @@ -0,0 +1,237 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Calls + { + public static void UpdateCall_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 323343598493248L; + // update Schedule a Call + Com.Zoho.Crm.API.Record.Record whoId = new Com.Zoho.Crm.API.Record.Record(); + whoId.Id = 4402481030088L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHO_ID, whoId); + Com.Zoho.Crm.API.Record.Record whatId = new Com.Zoho.Crm.API.Record.Record(); + whatId.Id = 440248884001L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHAT_ID, whatId); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_TYPE, new Choice("Outbound")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.OUTGOING_CALL_STATUS, new Choice("Scheduled")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_START_TIME, new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + Com.Zoho.Crm.API.Record.Record user = new Com.Zoho.Crm.API.Record.Record(); + user.Id = 440248254001L; + record1.AddKeyValue("Call_Owner", user); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.SUBJECT, "call scheduled"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.REMINDER, new Choice("5 mins")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_PURPOSE, new Choice("Demo")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_AGENDA, "agenda to make call"); + record1.AddKeyValue("$se_module", "Accounts"); + // update log a Call + Com.Zoho.Crm.API.Record.Record whoId1 = new Com.Zoho.Crm.API.Record.Record(); + whoId1.Id = 4402481030088L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHO_ID, whoId1); + Com.Zoho.Crm.API.Record.Record whatId1 = new Com.Zoho.Crm.API.Record.Record(); + whatId1.Id = 440248884001L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.WHAT_ID, whatId1); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_TYPE, new Choice("Outbound")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.SUBJECT, "call"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_DURATION, "10:00"); + record1.AddKeyValue("Voice_Recording__s", "recordingofcall.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.OUTGOING_CALL_STATUS, new Choice("Completed")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_START_TIME, new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_PURPOSE, new Choice("Demo")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_AGENDA, "agenda to make call"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.CALL_RESULT, "Not interested"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Calls.DESCRIPTION, "desc"); + record1.AddKeyValue("$se_module", "Accounts"); + // + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user_1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user_1.Id = 440248254001L; + record1.AddKeyValue("User_1", user_1); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + records.Add (record1); + bodyWrapper.Data = records; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Calls"; + UpdateCall_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Campaigns.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Campaigns.cs new file mode 100644 index 0000000..9838d2d --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Campaigns.cs @@ -0,0 +1,211 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Campaigns + { + public static void UpdateCampaigns_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 3223L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.CAMPAIGN_NAME, "New Campaign"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.START_DATE, new DateTime(2023, 12, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.END_DATE, new DateTime(2023, 12, 20).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.NUM_SENT, 10L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.ACTUAL_COST, 100.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.EXPECTED_REVENUE, 200.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.TYPE, new Choice("Webinar")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.BUDGETED_COST, 120.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.EXPECTED_RESPONSE, 200L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.DESCRIPTION, "Description of campaign"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Campaigns.STATUS, new Choice("Active")); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + // + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Campaigns"; + UpdateCampaigns_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Cases.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Cases.cs new file mode 100644 index 0000000..99a1119 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Cases.cs @@ -0,0 +1,223 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Cases + { + public static void UpdateCases_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 3434432L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.SUBJECT, "new Case"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.TYPE, new Choice("Question")); + Com.Zoho.Crm.API.Record.Record product_name = new Com.Zoho.Crm.API.Record.Record(); + product_name.AddKeyValue("id", 321334231321L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.PRODUCT_NAME, product_name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.CASE_ORIGIN, new Choice("Email")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.STATUS, new Choice("On Hold")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.REPORTED_BY, "none"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.PHONE, "31231242131"); + Com.Zoho.Crm.API.Record.Record contactName = new Com.Zoho.Crm.API.Record.Record(); + contactName.AddKeyValue("id", 31212323012312232L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.RELATED_TO, contactName); + Com.Zoho.Crm.API.Record.Record accountName = new Com.Zoho.Crm.API.Record.Record(); + accountName.AddKeyValue("id", 3245633789213L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.ACCOUNT_NAME, accountName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.EMAIL, "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.PRIORITY, new Choice("Low")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.CASE_REASON, new Choice("New Problem")); + Com.Zoho.Crm.API.Record.Record dealName = new Com.Zoho.Crm.API.Record.Record(); + dealName.AddKeyValue("id", 392223423412L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.DEAL_NAME, dealName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.DESCRIPTION, "description of case"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.INTERNAL_COMMENTS, "comments"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Cases.SOLUTION, "Solution for problem"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "cases"; + UpdateCases_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Contacts.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Contacts.cs new file mode 100644 index 0000000..03d881d --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Contacts.cs @@ -0,0 +1,236 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Contacts + { + public static void UpdateContacts_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 32324324494343L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.LAST_NAME, "Last Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.EMAIL, "abc@zoho.com"); + Com.Zoho.Crm.API.Record.Record accountname = new Com.Zoho.Crm.API.Record.Record(); + accountname.Id = 3213211322321323L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ACCOUNT_NAME, accountname); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.FIRST_NAME, "First Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.PHONE, "3323"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.TITLE, "Title"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.DEPARTMENT, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_PHONE, "12132"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.HOME_PHONE, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MOBILE, "4141"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.FAX, "fax"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.DATE_OF_BIRTH, new DateTime(2, 12, 01).Date); + Com.Zoho.Crm.API.Record.Record vendorName = new Com.Zoho.Crm.API.Record.Record(); + vendorName.Id = 3121323L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.VENDOR_NAME, vendorName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.EMAIL_OPT_OUT, false); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.SECONDARY_EMAIL, "abc2@zoho.com"); + Com.Zoho.Crm.API.Record.Record contact = new Com.Zoho.Crm.API.Record.Record(); + contact.Id = 3322321323L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.REPORTING_TO, contact); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.SKYPE_ID, "skype_id"); + // Address info of Contact + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.MAILING_ZIP, "zip"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.OTHER_ZIP, "zip"); + // + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + // + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Contacts"; + UpdateContacts_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Deals.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Deals.cs new file mode 100644 index 0000000..15fdc1a --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Deals.cs @@ -0,0 +1,217 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Deals + { + public static void UpdateDeals_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 322324L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.DEAL_NAME, "deal_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.AMOUNT, 100.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.CLOSING_DATE, new DateTime(2023, 12, 12).Date); + Com.Zoho.Crm.API.Record.Record account = new Com.Zoho.Crm.API.Record.Record(); + account.Id = 31212001L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ACCOUNT_NAME, account); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.STAGE, new Choice("Qualification")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.PROBABILITY, 10); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.TYPE, new Choice("New Business")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.NEXT_STEP, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.LEAD_SOURCE, new Choice("Advertisement")); + Com.Zoho.Crm.API.Record.Record contactName = new Com.Zoho.Crm.API.Record.Record(); + contactName.Id = 40220020342313L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.CONTACT_NAME, contactName); + Com.Zoho.Crm.API.Record.Record compaign = new Com.Zoho.Crm.API.Record.Record(); + compaign.Id = 322311243223L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.CAMPAIGN_SOURCE, compaign); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Deals"; + UpdateDeals_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Events.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Events.cs new file mode 100644 index 0000000..f4b8a12 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Events.cs @@ -0,0 +1,236 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using Participants = Com.Zoho.Crm.API.Record.Participants; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using Reminder = Com.Zoho.Crm.API.Record.Reminder; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Events + { + public static void UpdateEvents_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 32084748342793L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.DESCRIPTION, "Test Events"); + DateTimeOffset startDateTime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.START_DATETIME, startDateTime); + List participants = new List(); + Participants participant1 = new Participants(); + participant1.Email = "abc@zoho.com"; + participant1.Type = "email"; + participant1.Id = 4402481056002L; + participants.Add (participant1); + Participants participant2 = new Participants(); + participant2.AddKeyValue("participant", "34770617425"); + participant2.AddKeyValue("type", "lead"); + participants.Add (participant2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.PARTICIPANTS, participants); + record1.AddKeyValue("$send_notification", true); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.EVENT_TITLE, "New Automated Event"); + DateTimeOffset enddatetime = new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local)); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.END_DATETIME, enddatetime); + List reminderList = new List(); + Reminder remindAt1 = new Reminder(); + remindAt1.Period = "minutes"; + remindAt1.Unit = 15; + reminderList.Add (remindAt1); + remindAt1 = new Reminder(); + remindAt1.Period = "days"; + remindAt1.Unit = 1; + remindAt1.Time = "10.30"; + reminderList.Add (remindAt1); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.REMIND_AT, reminderList); + record1.AddKeyValue("$se_module", "Leads"); + Com.Zoho.Crm.API.Record.Record whatId1 = new Com.Zoho.Crm.API.Record.Record(); + whatId1.Id = 34770614381002L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.WHAT_ID, whatId1); + record1.AddKeyValue("Currency", new Choice("USD")); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + records.Add (record1); + bodyWrapper.Data = records; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Events"; + UpdateEvents_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Invoices.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Invoices.cs new file mode 100644 index 0000000..a0ae338 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Invoices.cs @@ -0,0 +1,255 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Invoices + { + public static void UpdateInvoices_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record accountname = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 3345498598275042L; + accountname.AddKeyValue("name", "automated"); + // accountname.AddFieldValue(Field.Accounts.ID, 440248884001L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.ACCOUNT_NAME, accountname); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.SUBJECT, "new invoice"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.ADJUSTMENT, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.INVOICE_DATE, new DateTime(2023, 10, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.DUE_DATE, new DateTime(2023, 12, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.SALES_COMMISSION, 20.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.PURCHASE_ORDER, "purchase order"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.EXCISE_DUTY, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.STATUS, new Choice("Created")); + Com.Zoho.Crm.API.Record.Record contactname = new Com.Zoho.Crm.API.Record.Record(); + contactname.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 347706111853001l); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.CONTACT_NAME, contactname); + Com.Zoho.Crm.API.Record.Record dealname = new Com.Zoho.Crm.API.Record.Record(); + dealname.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ID, 347706111383007); + record1.AddKeyValue("Deal_Name__s", dealname); + Com.Zoho.Crm.API.Record.Record sales_order = new Com.Zoho.Crm.API.Record.Record(); + sales_order.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ID, 32203232899292L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.SALES_ORDER, sales_order); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.TERMS_AND_CONDITIONS, "details of terms and conditions"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.DESCRIPTION, "description"); + List inventoryLineItemList3 = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem3 = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct3 = new LineItemProduct(); + lineItemProduct3.Id = 440248954344L; + // Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + // data.Id = 440248954344L; + inventoryLineItem3.AddKeyValue("Description", "asd"); + inventoryLineItem3.AddKeyValue("Discount", "5"); + inventoryLineItem3.AddKeyValue("Quantity", 10.0); + inventoryLineItem3.AddKeyValue("List_Price", 100.0); + inventoryLineItem3.AddKeyValue("Product_Name", lineItemProduct3); + // inventoryLineItem3.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList3.Add (inventoryLineItem3); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Invoices.INVOICED_ITEMS, inventoryLineItemList3); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STREET, "shipping street"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Invoices"; + UpdateInvoices_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Leads.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Leads.cs new file mode 100644 index 0000000..04eacc8 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Leads.cs @@ -0,0 +1,227 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Leads + { + public static void UpdateLeads_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 32112330437932L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LAST_NAME, "Last Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.FIRST_NAME, "First Name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.COMPANY, "KKRNP"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.ANNUAL_REVENUE, 1221.2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LEAD_STATUS, new Choice("Not Contacted")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.LEAD_SOURCE, new Choice("Advertisement")); + record1.AddKeyValue("Title", "title"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.PHONE, "11123"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.MOBILE, "200221"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.INDUSTRY, new Choice("ERP")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.EMAIL_OPT_OUT, true); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.EMAIL, "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.FAX, "fax"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.WEBSITE, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.NO_OF_EMPLOYEES, 10); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.RATING, new Choice("Active")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.SKYPE_ID, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.SECONDARY_EMAIL, "abc1@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.TWITTER, null); + // Address info of Lead + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.CITY, "City"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.ZIP_CODE, "501210"); + // + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Leads.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can add update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 3245689242003L; + // + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Leads"; + UpdateLeads_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/PriceBooks.cs b/versions/3.0.0/Samples/Record/UpdateRecords/PriceBooks.cs new file mode 100644 index 0000000..0f06fb5 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/PriceBooks.cs @@ -0,0 +1,217 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using PricingDetails = Com.Zoho.Crm.API.Record.PricingDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class PriceBooks + { + public static void UpdatePriceBooks_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 303453467895L; + List pricingDetails = new List(); + PricingDetails pricingDetail1 = new PricingDetails(); + pricingDetail1.FromRange = 1.0; + pricingDetail1.ToRange = 5.0; + pricingDetail1.Discount = 2.0; + pricingDetails.Add (pricingDetail1); + PricingDetails pricingDetail2 = new PricingDetails(); + pricingDetail2.AddKeyValue("from_range", 6.0); + pricingDetail2.AddKeyValue("to_range", 11.0); + pricingDetail2.AddKeyValue("discount", 3.0); + pricingDetails.Add (pricingDetail2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.PRICING_DETAILS, pricingDetails); + record1.AddKeyValue("Email", "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.DESCRIPTION, "TEST"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.PRICE_BOOK_NAME, "book_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Price_Books.PRICING_MODEL, new Choice("Flat")); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() { new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + records.Add (record1); + bodyWrapper.Data = records; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Price_Books"; + UpdatePriceBooks_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Products.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Products.cs new file mode 100644 index 0000000..54430d1 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Products.cs @@ -0,0 +1,230 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Products + { + public static void UpdateProducts_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 3034553467895L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_NAME, "product_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_CODE, "product_code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_ACTIVE, true); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.PRODUCT_CATEGORY, new Choice("Software")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SALES_END_DATE, new DateTime(2023, 12, 25).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SUPPORT_EXPIRY_DATE, new DateTime(2025, 12, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SALES_START_DATE, new DateTime(2023, 06, 12).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.SUPPORT_START_DATE, new DateTime(2023, 06, 20).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.MANUFACTURER, new Choice("MetBeat Corp.")); + Com.Zoho.Crm.API.Record.Record vendor = new Com.Zoho.Crm.API.Record.Record(); + vendor.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ID, 4402481054948L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.VENDOR_NAME, vendor); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.DESCRIPTION, "description of product"); + // price info of Product + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.UNIT_PRICE, 33.22); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.COMMISSION_RATE, 12.2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.TAXABLE, true); + List taxes = new List(); + Com.Zoho.Crm.API.Record.Tax tax = new Com.Zoho.Crm.API.Record.Tax(); + tax.Id = 440248020807L; + tax.Value = "15.0"; + record1.AddKeyValue("Tax", taxes); + // stock info of Product + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.USAGE_UNIT, new Choice("Box")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.QTY_IN_STOCK, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.QTY_IN_DEMAND, 5.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.QTY_ORDERED, 5.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Products.REORDER_LEVEL, 0.0); + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("Handler", user); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user_1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user_1.Id = 440248254001L; + record1.AddKeyValue("User_1", user_1); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }) ; + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Products"; + UpdateProducts_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/PurchaseOrders.cs b/versions/3.0.0/Samples/Record/UpdateRecords/PurchaseOrders.cs new file mode 100644 index 0000000..b9f808a --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/PurchaseOrders.cs @@ -0,0 +1,252 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class PurchaseOrders + { + public static void UpdatePurchaseOrders_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 303453467895L; + Com.Zoho.Crm.API.Record.Record vendor = new Com.Zoho.Crm.API.Record.Record(); + vendor.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ID, 4402481054948L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.VENDOR_NAME, vendor); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.SUBJECT, "new order"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.ADJUSTMENT, 30.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.CARRIER, new Choice("FedEx")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.PO_DATE, new DateTime(2023, 9, 23).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.PO_NUMBER, "123123"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.EXCISE_DUTY, 25.0); + Com.Zoho.Crm.API.Record.Record vendor_name = new Com.Zoho.Crm.API.Record.Record(); + vendor_name.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ID, 34232534242421L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.VENDOR_NAME, vendor_name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.TRACKING_NUMBER, "42231"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.SALES_COMMISSION, 43.32); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.REQUISITION_NO, null); + Com.Zoho.Crm.API.Record.Record contact_Name = new Com.Zoho.Crm.API.Record.Record(); + contact_Name.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 34520342342321L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.CONTACT_NAME, contact_Name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.DESCRIPTION, "description"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.TERMS_AND_CONDITIONS, "details of terms and condition"); + List inventoryLineItemList = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct = new LineItemProduct(); + lineItemProduct.Id = 440248954344L; + // Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + // data.Id = 440248954344L; + inventoryLineItem.AddKeyValue("Description", "asd"); + inventoryLineItem.AddKeyValue("Discount", "5"); + inventoryLineItem.AddKeyValue("Quantity", 10.0); + inventoryLineItem.AddKeyValue("List_Price", 100.0); + inventoryLineItem.AddKeyValue("Product_Name", lineItemProduct); + // inventoryLineItem.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList.Add (inventoryLineItem); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Purchase_Orders.PURCHASE_ITEMS, inventoryLineItemList); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STREET, "shipping street"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Purchase_Orders"; + UpdatePurchaseOrders_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Quotes.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Quotes.cs new file mode 100644 index 0000000..959de20 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Quotes.cs @@ -0,0 +1,250 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Quotes + { + public static void UpdateQuotes_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 322124347654l; + Com.Zoho.Crm.API.Record.Record accountName = new Com.Zoho.Crm.API.Record.Record(); + accountName.AddKeyValue("name", "automated"); + // accountName.AddFieldValue(Field.Accounts.ID, 440248884001L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.ACCOUNT_NAME, accountName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SUBJECT, "new quote"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.ADJUSTMENT, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.VALID_TILL, new DateTime(2023, 12, 10).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.TEAM, "teamName"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.TERMS_AND_CONDITIONS, "details of terms and conditions"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.DESCRIPTION, "description"); + Com.Zoho.Crm.API.Record.Record dealName = new Com.Zoho.Crm.API.Record.Record(); + dealName.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ID, 347706111383007l); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.DEAL_NAME, dealName); + Com.Zoho.Crm.API.Record.Record contactName = new Com.Zoho.Crm.API.Record.Record(); + contactName.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 347706111853001l); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.CONTACT_NAME, contactName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.QUOTE_STAGE, new Choice("Draft")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.CARRIER, new Choice("FedEX")); + List inventoryLineItemList = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct = new LineItemProduct(); + lineItemProduct.Id = 440248954344L; + // Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + // data.Id = 440248954344L; + inventoryLineItem.AddKeyValue("Description", "asd"); + inventoryLineItem.AddKeyValue("Discount", "5"); + inventoryLineItem.AddKeyValue("Quantity", 10.0); + inventoryLineItem.AddKeyValue("List_Price", 100.0); + inventoryLineItem.AddKeyValue("Product_Name", lineItemProduct); + // inventoryLineItem.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList.Add (inventoryLineItem); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.QUOTED_ITEMS, inventoryLineItemList); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.SHIPPING_STREET, "shipping street"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() {new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Quotes"; + UpdateQuotes_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/SalesOrders.cs b/versions/3.0.0/Samples/Record/UpdateRecords/SalesOrders.cs new file mode 100644 index 0000000..6619019 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/SalesOrders.cs @@ -0,0 +1,257 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using LineItemProduct = Com.Zoho.Crm.API.Record.LineItemProduct; +using LineTax = Com.Zoho.Crm.API.Record.LineTax; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class SalesOrders + { + public static void UpdateSalesOrders_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 347706878001; + Com.Zoho.Crm.API.Record.Record account = new Com.Zoho.Crm.API.Record.Record(); + account.AddKeyValue("name", "automated"); + account.AddFieldValue(Com.Zoho.Crm.API.Record.Accounts.ID, 440248884001L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ACCOUNT_NAME, account); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SUBJECT, "new order"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ADJUSTMENT, 10.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.DESCRIPTION, "description"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.TERMS_AND_CONDITIONS, "details of terms and conditions"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.CUSTOMER_NO, "123212211"); + Com.Zoho.Crm.API.Record.Record quoteName = new Com.Zoho.Crm.API.Record.Record(); + quoteName.AddFieldValue(Com.Zoho.Crm.API.Record.Quotes.ID, 329202323121L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.QUOTE_NAME, quoteName); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.PENDING, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.CARRIER, new Choice("FedEX")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SALES_COMMISSION, 40.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.PURCHASE_ORDER, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.EXCISE_DUTY, 30.0); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.STATUS, new Choice("Created")); + Com.Zoho.Crm.API.Record.Record deal_name = new Com.Zoho.Crm.API.Record.Record(); + deal_name.AddFieldValue(Com.Zoho.Crm.API.Record.Deals.ID, 3212431324313L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.DEAL_NAME, deal_name); + Com.Zoho.Crm.API.Record.Record contact_name = new Com.Zoho.Crm.API.Record.Record(); + contact_name.AddFieldValue(Com.Zoho.Crm.API.Record.Contacts.ID, 32343533322342L); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.CONTACT_NAME, contact_name); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.DUE_DATE, new DateTime(2023, 12, 21).Date); + List inventoryLineItemList2 = new List(); + Com.Zoho.Crm.API.Record.Record inventoryLineItem2 = new Com.Zoho.Crm.API.Record.Record(); + LineItemProduct lineItemProduct2 = new LineItemProduct(); + lineItemProduct2.Id = 440248954344L; + // Com.Zoho.Crm.API.record.Record data = new Com.Zoho.Crm.API.Record.Record(); + // data.Id = 440248954344L; + inventoryLineItem2.Id = 347709878002L; + inventoryLineItem2.AddKeyValue("Description", "asd"); + inventoryLineItem2.AddKeyValue("Discount", "5"); + inventoryLineItem2.AddKeyValue("Quantity", 10.0); + inventoryLineItem2.AddKeyValue("List_Price", 100.0); + inventoryLineItem2.AddKeyValue("Product_Name", lineItemProduct2); + inventoryLineItem2.AddKeyValue("Product_Category_1", "hardware"); + inventoryLineItemList2.Add (inventoryLineItem2); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.ORDERED_ITEMS, inventoryLineItemList2); + List lineTaxes = new List(); + LineTax lineTax = new LineTax(); + lineTax.Name = "MyTax1134"; + lineTax.Percentage = 20.0; + lineTaxes.Add (lineTax); + record1.AddKeyValue("$line_tax", lineTaxes); + // Address info + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.BILLING_CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.BILLING_CODE, "12345"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.BILLING_COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.BILLING_STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.BILLING_STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SHIPPING_CITY, "shipping city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SHIPPING_CODE, "shipping code"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SHIPPING_COUNTRY, "shipping country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SHIPPING_STATE, "shipping state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Sales_Orders.SHIPPING_STREET, "shipping street"); + //Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add(linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add(fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add(fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() { new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add(subform); + record1.AddKeyValue("Subform_2", subformList); + //can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add(tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Sales_Orders"; + UpdateSalesOrders_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Solutions.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Solutions.cs new file mode 100644 index 0000000..51f9ef2 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Solutions.cs @@ -0,0 +1,206 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Solutions + { + public static void UpdateSolutions_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 39034223024324; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.SOLUTION_TITLE, "new Solution"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.STATUS, new Choice("Draft")); + Com.Zoho.Crm.API.Record.Record product = new Com.Zoho.Crm.API.Record.Record(); + product.Id = 3456064049533L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.PRODUCT_NAME, product); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.QUESTION, "question?"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Solutions.ANSWER, "answer"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() { new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Solutions"; + UpdateSolutions_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Tasks.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Tasks.cs new file mode 100644 index 0000000..1b67cc6 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Tasks.cs @@ -0,0 +1,223 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using RecurringActivity = Com.Zoho.Crm.API.Record.RecurringActivity; +using RemindAt = Com.Zoho.Crm.API.Record.RemindAt; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Tasks + { + public static void UpdateTask_1(string moduleAPIName) + { + RecordOperations recordOperations = new RecordOperations(moduleAPIName); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 303453453467895L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.DESCRIPTION, "Test Task"); + record1.AddKeyValue("Rupee", new Choice("INR")); + RemindAt remindAt = new RemindAt(); + remindAt.Alarm = "ACTION=EMAILANDPOPUP;TRIGGER=DATE-TIME:2023-07-03T12:30:00+05:30"; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.REMIND_AT, remindAt); + // Com.Zoho.Crm.API.Record.Record whoId = new Com.Zoho.Crm.API.Record.Record(); + // whoId.Id = 440248774074L);; + // record1.AddFieldValue(Field.Tasks.WHO_ID, whoId); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.STATUS, new Choice("Not Started")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.DUE_DATE, new DateTime(2023, 12, 13).Date); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.PRIORITY, new Choice("Low")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.SUBJECT, "Email1"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.SEND_NOTIFICATION_EMAIL, false); + record1.AddKeyValue("$se_module", "Leads"); + Com.Zoho.Crm.API.Record.Record whatId = new Com.Zoho.Crm.API.Record.Record(); + whatId.Id = 440248774074L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Tasks.WHAT_ID, whatId); + /** Recurring Activity can be provided in any activity module */ + RecurringActivity recurringActivity = new RecurringActivity(); + recurringActivity.Rrule = "FREQ=DAILY;INTERVAL=10;UNTIL=2023-08-14;DTSTART=2023-07-03"; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Events.RECURRING_ACTIVITY, recurringActivity); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() { new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + records.Add (record1); + bodyWrapper.Data = records; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Tasks"; + UpdateTask_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/Record/UpdateRecords/Vendors.cs b/versions/3.0.0/Samples/Record/UpdateRecords/Vendors.cs new file mode 100644 index 0000000..bab3499 --- /dev/null +++ b/versions/3.0.0/Samples/Record/UpdateRecords/Vendors.cs @@ -0,0 +1,211 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using HeaderMap = Com.Zoho.Crm.API.HeaderMap; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.Record.APIException; +using ActionHandler = Com.Zoho.Crm.API.Record.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.Record.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.Record.ActionWrapper; +using BodyWrapper = Com.Zoho.Crm.API.Record.BodyWrapper; +using Consent = Com.Zoho.Crm.API.Record.Consent; +using FileDetails = Com.Zoho.Crm.API.Record.FileDetails; +using RecordOperations = Com.Zoho.Crm.API.Record.RecordOperations; +using SuccessResponse = Com.Zoho.Crm.API.Record.SuccessResponse; +using Tag = Com.Zoho.Crm.API.Tags.Tag; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Record.Updaterecords +{ + public class Vendors + { + public static void UpdateVendors_1(string module) + { + RecordOperations recordOperations = new RecordOperations(module); + BodyWrapper bodyWrapper = new BodyWrapper(); + List records = new List(); + Com.Zoho.Crm.API.Record.Record record1 = new Com.Zoho.Crm.API.Record.Record(); + record1.Id = 23245234364525L; + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.VENDOR_NAME, "vendor_name"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.PHONE, "12343213"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.EMAIL, "abc@zoho.com"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.WEBSITE, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.GL_ACCOUNT, new Choice("Sales-Software")); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.CATEGORY, null); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.CITY, "city"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.COUNTRY, "country"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.STATE, "state"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.STREET, "street"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.ZIP_CODE, "zipcode"); + record1.AddFieldValue(Com.Zoho.Crm.API.Record.Vendors.DESCRIPTION, "description"); + // Used when GDPR is enabled + Consent dataConsent = new Consent(); + dataConsent.ConsentRemarks = "Approved."; + dataConsent.ConsentThrough = "Email"; + dataConsent.ContactThroughEmail = true; + dataConsent.ContactThroughSocial = false; + dataConsent.ContactThroughPhone = true; + dataConsent.ContactThroughSurvey = true; + dataConsent.ConsentDate = new DateTime(2023, 10, 11).Date; + dataConsent.DataProcessingBasis = "Obtained"; + record1.AddKeyValue("Data_Processing_Basis_Details", dataConsent); + // for MultiSelectLookUp/custom MultiSelectLookUp + List Multirecords = new List(); + Com.Zoho.Crm.API.Record.Record record = new Com.Zoho.Crm.API.Record.Record(); + Com.Zoho.Crm.API.Record.Record linkingRecord = new Com.Zoho.Crm.API.Record.Record(); + record.AddKeyValue("id", 440248884001L); + linkingRecord.AddKeyValue("Msl", record); + Multirecords.Add (linkingRecord); + record1.AddKeyValue("Msl", Multirecords); + // for Custom Fields + record1.AddKeyValue("External", "Value12345"); + record1.AddKeyValue("Custom_field", "Value"); + record1.AddKeyValue("Date_Time_2", new DateTimeOffset(new DateTime(2020, 05, 15, 12, 0, 0, DateTimeKind.Local))); + record1.AddKeyValue("Date_1", new DateTime(2021, 1, 13).Date); + record1.AddKeyValue("Subject", "AutomatedSDK"); + record1.AddKeyValue("Product_Name", "AutomatedSDK"); + List fileDetails = new List(); + FileDetails fileDetail1 = new FileDetails(); + fileDetail1.FileIdS = "ae9c7cefa418aa5cc2d9ab35c32a6ae23d729ad87c6d90b0bd44183d280"; + fileDetail1.Delete = null; + fileDetails.Add (fileDetail1); + FileDetails fileDetail2 = new FileDetails(); + fileDetail2.FileIdS = "ae9c7cefa418aec1d6a5cc2d9ab35c32e0063e7321b5b4ca34519e6cdb2"; + fileDetail2.Delete = null; + fileDetails.Add (fileDetail2); + record1.AddKeyValue("File_Upload", fileDetails); + // for Custom User LookUp + Com.Zoho.Crm.API.Users.MinifiedUser user = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user.Id = 440248254001L; + record1.AddKeyValue("User_1", user); + // for Custom LookUp + Com.Zoho.Crm.API.Record.Record data = new Com.Zoho.Crm.API.Record.Record(); + data.Id = 440248774074L; + record1.AddKeyValue("Lookup_2", data); + // for Custom pickList + record1.AddKeyValue("pick", new Choice("true")); + // for Custom MultiSelect + record1.AddKeyValue("Multiselect", new List>() { new Choice("Option 1"), new Choice("Option 2") }); + // Subform sample code + List subformList = new List(); + Com.Zoho.Crm.API.Record.Record subform = new Com.Zoho.Crm.API.Record.Record(); + subform.AddKeyValue("customfield", "customvalue"); + Com.Zoho.Crm.API.Users.MinifiedUser user1 = new Com.Zoho.Crm.API.Users.MinifiedUser(); + user1.Id = 440248254001L; + subform.AddKeyValue("Userfield", user1); + subformList.Add (subform); + record1.AddKeyValue("Subform_2", subformList); + // can update another record with same above mention fields + Com.Zoho.Crm.API.Record.Record record2 = new Com.Zoho.Crm.API.Record.Record(); + record2.Id = 35002303403L; + List tagList = new List(); + Tag tag = new Tag(); + tag.Name = "Testtask"; + tagList.Add (tag); + record1.Tag = tagList; + // Add Record instance to the list + records.Add (record1); + bodyWrapper.Data = records; + List trigger = new List(); + trigger.Add ("approval"); + trigger.Add ("workflow"); + trigger.Add ("blueprint"); + bodyWrapper.Trigger = trigger; + // bodyWrapper.LarId = "3477061087515"; + HeaderMap headerInstance = new HeaderMap(); + // headerInstance.Add (CreateRecordsHeader.X_EXTERNAL, "Quotes.Quoted_Items.Product_Name.Products_External"); + APIResponse response = recordOperations.UpdateRecords(bodyWrapper, headerInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionResponses = actionWrapper.Data; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + string moduleAPIName = "Vendors"; + UpdateVendors_1(moduleAPIName); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/ShiftHours/CreateShiftHours.cs b/versions/3.0.0/Samples/ShiftHours/CreateShiftHours.cs new file mode 100644 index 0000000..72b4b6d --- /dev/null +++ b/versions/3.0.0/Samples/ShiftHours/CreateShiftHours.cs @@ -0,0 +1,135 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using ActionHandler = Com.Zoho.Crm.API.BusinessHours.ActionHandler; +using BodyWrapper = Com.Zoho.Crm.API.BusinessHours.BodyWrapper; +using BreakHoursCustomTiming = Com.Zoho.Crm.API.BusinessHours.BreakHoursCustomTiming; +using BusinessHours = Com.Zoho.Crm.API.BusinessHours.BusinessHours; +using BusinessHoursOperations = Com.Zoho.Crm.API.BusinessHours.BusinessHoursOperations; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using APIException = Com.Zoho.Crm.API.BusinessHours.APIException; +using ActionResponse = Com.Zoho.Crm.API.BusinessHours.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.BusinessHours.ActionWrapper; +using SuccessResponse = Com.Zoho.Crm.API.BusinessHours.SuccessResponse; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Shifthours +{ + public class CreateBusinessHours + { + public static void CreateBusinessHours_1() + { + BusinessHoursOperations businessHoursOperations = new BusinessHoursOperations("X-CRM-ORG"); + BodyWrapper request = new BodyWrapper(); + BusinessHours businessHours = new BusinessHours(); + List> businessdays = new List>(); + businessdays.Add(new Choice("Monday")); + businessHours.BusinessDays = businessdays; + businessHours.WeekStartsOn = new Choice("Monday"); + BreakHoursCustomTiming bhct = new BreakHoursCustomTiming(); + bhct.Days = new Choice("Monday"); + List businessTiming = new List(); + businessTiming.Add("10:00"); + businessTiming.Add("11:00"); + bhct.BusinessTiming = businessTiming; + List customTiming = new List(); + customTiming.Add(bhct); + businessHours.CustomTiming = customTiming; + businessHours.SameAsEveryday = false; + // when sameasEveryDay is true + List> dailyTiming = new List>(); + dailyTiming.Add(new Choice("10:00")); + dailyTiming.Add(new Choice("11:00")); + businessHours.Type = new Choice("custom"); + request.BusinessHours = businessHours; + APIResponse response = businessHoursOperations.CreateBusinessHours(request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper)actionHandler; + ActionResponse actionResponse = actionWrapper.BusinessHours; + if (actionResponse is SuccessResponse) + { + SuccessResponse businesshourscreated = (SuccessResponse)actionResponse; + Console.WriteLine("Status: " + businesshourscreated.Status.Value); + Console.WriteLine("Code: " + businesshourscreated.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in businesshourscreated.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + businesshourscreated.Message.Value); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException)actionResponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException)actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message.Value); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + CreateBusinessHours_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/ShiftHours/GetShiftHours.cs b/versions/3.0.0/Samples/ShiftHours/GetShiftHours.cs new file mode 100644 index 0000000..7333b92 --- /dev/null +++ b/versions/3.0.0/Samples/ShiftHours/GetShiftHours.cs @@ -0,0 +1,204 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using APIException = Com.Zoho.Crm.API.ShiftHours.APIException; +using BreakCustomTiming = Com.Zoho.Crm.API.ShiftHours.BreakCustomTiming; +using BreakHours = Com.Zoho.Crm.API.ShiftHours.BreakHours; +using ResponseHandler = Com.Zoho.Crm.API.ShiftHours.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.ShiftHours.ResponseWrapper; +using ShiftCount = Com.Zoho.Crm.API.ShiftHours.ShiftCount; +using ShiftCustomTiming = Com.Zoho.Crm.API.ShiftHours.ShiftCustomTiming; +using ShiftHours = Com.Zoho.Crm.API.ShiftHours.ShiftHours; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using ShiftHoursOperations = Com.Zoho.Crm.API.ShiftHours.ShiftHoursOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.Shifthours +{ + public class GetShiftHours + { + public static void GetShiftHours_1() + { + ShiftHoursOperations shiftHoursOperations = new ShiftHoursOperations("440248020813"); + APIResponse response = shiftHoursOperations.GetShiftHours(); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseObject = (ResponseHandler) response.Object; + if (responseObject is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseObject; + ShiftCount shiftcount = responseWrapper.ShiftCount; + Console.WriteLine ("Shift_count :"); + Console.WriteLine ("total_shift_with_user :" + shiftcount.TotalShiftWithUser); + Console.WriteLine ("total_shift :" + shiftcount.TotalShift); + List shifthours = responseWrapper.ShiftHours; + foreach (ShiftHours shifthour in shifthours) + { + Console.WriteLine ("name : " + shifthour.Name); + Console.WriteLine ("same_as_everyday : " + shifthour.SameAsEveryday); + Console.WriteLine ("shifthour id : " + shifthour.Id); + Console.WriteLine ("users_count : " + shifthour.UsersCount); + Console.WriteLine ("timezone : " + shifthour.Timezone); + List shiftDays = shifthour.ShiftDays; + if (shiftDays != null) + { + Console.WriteLine ("ShiftDays : "); + foreach (string shiftDay in shiftDays) + { + Console.WriteLine (shiftDay); + } + } + List dailyTiming = shifthour.DailyTiming; + if (dailyTiming != null) + { + Console.WriteLine ("Daily_timing : "); + foreach (TimeSpan dailytiming in dailyTiming) + { + Console.WriteLine (dailytiming); + } + } + List customTiming = shifthour.CustomTiming; + if(customTiming != null) { + Console.WriteLine ("custom_timing : "); + foreach (ShiftCustomTiming customtiming in customTiming) { + List shiftTiming = customtiming.ShiftTiming; + Console.WriteLine ("shift_timing :"); + foreach (TimeSpan shifttiming in shiftTiming) { + Console.WriteLine (shifttiming); + } + Console.WriteLine ("days : "+ customtiming.Days); + } + } + List holidays = shifthour.Holidays; + if (holidays != null) + { + Console.WriteLine ("holidays : "); + foreach (Com.Zoho.Crm.API.ShiftHours.Holidays holiday in holidays) + { + Console.WriteLine ("date : " + holiday.Date); + Console.WriteLine ("year : " + holiday.Year); + Console.WriteLine ("name : " + holiday.Name); + Console.WriteLine ("id : " + holiday.Id); + } + } + List users = shifthour.Users; + if (users != null) + { + Console.WriteLine ("Users : "); + foreach (Com.Zoho.Crm.API.ShiftHours.Users user in users) + { + Console.WriteLine ("User_Id : " + user.Id); + Console.WriteLine ("User_name : " + user.Name); + Console.WriteLine ("User_email : " + user.Email); + Console.WriteLine ("User_role : " + user.Role); + Console.WriteLine ("User_ZUID : " + user.Zuid); + Console.WriteLine ("effective_from : " + user.EffectiveFrom); + } + } + List breakHours = shifthour.BreakHours; + if (breakHours != null) + { + foreach (BreakHours breakhour in breakHours) + { + Console.WriteLine ("breakHour_ID : " + breakhour.Id); + Console.WriteLine ("same_as_everyday : " + breakhour.SameAsEveryday); + List breakdays = breakhour.BreakDays; + if (breakdays != null) + { + foreach (string breakday in breakdays) + { + Console.WriteLine ("breakdays : " + breakday); + } + } + List dailyTimings = breakhour.DailyTiming; + if (dailyTimings != null) + { + foreach (TimeSpan dailytiming in dailyTimings) + { + Console.WriteLine ("dailyTiming : " + dailytiming); + } + } + List breakHoursCustomTimings = breakhour.CustomTiming; + if (breakHoursCustomTimings != null) + { + foreach (BreakCustomTiming breakHourCustomTiming in breakHoursCustomTimings) + { + Console.WriteLine ("CustomTiming : "); + List breakTimings = breakHourCustomTiming.BreakTiming; + if (breakTimings != null) + { + foreach (TimeSpan breakTiming in breakTimings) + { + Console.WriteLine ("breakTiming : " + breakTiming); + } + Console.WriteLine ("days : " + breakHourCustomTiming.Days); + } + } + } + } + } + } + } + else if (responseObject is APIException) + { + APIException exception = (APIException) responseObject; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetShiftHours_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/CreateGroup.cs b/versions/3.0.0/Samples/UserGroups/CreateGroup.cs new file mode 100644 index 0000000..7b14dc2 --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/CreateGroup.cs @@ -0,0 +1,129 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using ActionHandler = Com.Zoho.Crm.API.UserGroups.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.UserGroups.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.UserGroups.ActionWrapper; +using SuccessResponse = Com.Zoho.Crm.API.UserGroups.SuccessResponse; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using BodyWrapper = Com.Zoho.Crm.API.UserGroups.BodyWrapper; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + +namespace Samples.UserGroups +{ + public class CreateGroup + { + public static void CreateGroup_1() + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + BodyWrapper request = new BodyWrapper(); + List userList = new List(); + Com.Zoho.Crm.API.UserGroups.Groups user1 = new Com.Zoho.Crm.API.UserGroups.Groups(); + user1.Name = "test group"; + user1.Description = "my group"; + List sources = new List(); + Com.Zoho.Crm.API.UserGroups.Sources source = new Com.Zoho.Crm.API.UserGroups.Sources(); + source.Type = new Choice("users"); + Com.Zoho.Crm.API.UserGroups.Source source1 = new Com.Zoho.Crm.API.UserGroups.Source(); + source1.Id = 4402480254001; + source.Source = source1; + sources.Add(source); + user1.Sources = sources; + userList.Add(user1); + request.UserGroups = userList; + APIResponse response = userGroupsOperations.CreateGroups(request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper responseWrapper = (ActionWrapper) actionHandler; + List actionResponses = responseWrapper.UserGroups; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + CreateGroup_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} diff --git a/versions/3.0.0/Samples/UserGroups/DeleteGroup.cs b/versions/3.0.0/Samples/UserGroups/DeleteGroup.cs new file mode 100644 index 0000000..c69ea4a --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/DeleteGroup.cs @@ -0,0 +1,113 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using ActionHandler = Com.Zoho.Crm.API.UserGroups.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.UserGroups.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.UserGroups.ActionWrapper; +using SuccessResponse = Com.Zoho.Crm.API.UserGroups.SuccessResponse; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + +namespace Samples.UserGroups +{ + public class DeleteGroup + { + public static void DeleteGroup_1(long groupId) + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + APIResponse response = userGroupsOperations.DeleteGroup(groupId); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper responseWrapper = (ActionWrapper) actionHandler; + List actionResponses = responseWrapper.UserGroups; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long groupId = 440248001279024; + DeleteGroup_1(groupId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/GetAssociatedUsersCount.cs b/versions/3.0.0/Samples/UserGroups/GetAssociatedUsersCount.cs new file mode 100644 index 0000000..3448bf5 --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/GetAssociatedUsersCount.cs @@ -0,0 +1,123 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using AssociatedUser = Com.Zoho.Crm.API.UserGroups.AssociatedUser; +using AssociatedUserCount = Com.Zoho.Crm.API.UserGroups.AssociatedUserCount; +using Info = Com.Zoho.Crm.API.UserGroups.Info; +using ResponseHandler = Com.Zoho.Crm.API.UserGroups.ResponseHandler; +using UserGroup = Com.Zoho.Crm.API.UserGroups.UserGroup; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + +namespace Samples.UserGroups +{ + public class GetAssociatedUsersCount + { + public static void GetAssociatedUsersCount_1() + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + APIResponse response = userGroupsOperations.GetAssociatedUsersCount(); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is AssociatedUserCount) + { + List associatedUsersCount = ((AssociatedUserCount) responseHandler).AssociatedUsersCount; + if (associatedUsersCount != null) + { + foreach (AssociatedUser associatedUser in associatedUsersCount) + { + Console.WriteLine ("AssociatedUser count: " + associatedUser.Count); + UserGroup userGroup = associatedUser.UserGroup; + if (userGroup != null) + { + Console.WriteLine ("AssociatedUser Name: " + userGroup.Name); + Console.WriteLine ("AssociatedUser ID: " + userGroup.Id); + } + } + } + Info info = ((AssociatedUserCount) responseHandler).Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine ("User Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine ("User Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine ("User Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine ("User Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetAssociatedUsersCount_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/GetAssociations.cs b/versions/3.0.0/Samples/UserGroups/GetAssociations.cs new file mode 100644 index 0000000..b7b9c8b --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/GetAssociations.cs @@ -0,0 +1,118 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using MinifiedModule = Com.Zoho.Crm.API.Modules.MinifiedModule; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using AssociationModule = Com.Zoho.Crm.API.UserGroups.AssociationModule; +using AssociationResponse = Com.Zoho.Crm.API.UserGroups.AssociationResponse; +using AssociationWrapper = Com.Zoho.Crm.API.UserGroups.AssociationWrapper; +using Resource = Com.Zoho.Crm.API.UserGroups.Resource; +using ResponseHandler = Com.Zoho.Crm.API.UserGroups.ResponseHandler; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.UserGroups +{ + public class GetAssociations + { + public static void GetAssociations_1(long groupId) + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + APIResponse response = userGroupsOperations.GetAssociations(groupId); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is AssociationWrapper) + { + AssociationWrapper assoicationWrapper = (AssociationWrapper) responseHandler; + List associations = assoicationWrapper.Associations; + if (associations != null) + { + foreach (AssociationResponse associationResponse in associations) + { + Console.WriteLine ("Associations Type : " + associationResponse.Type); + Resource resource = associationResponse.Resource; + if (resource != null) + { + Console.WriteLine ("Associations Resource Id : " + resource.Id); + Console.WriteLine ("Associations Resource Name : " + resource.Name); + } + AssociationModule detail = associationResponse.Detail; + if (detail != null) + { + MinifiedModule module = detail.Module; + if (module != null) + { + Console.WriteLine ("Associations Module Id : " + module.Id); + Console.WriteLine ("Associations Module Id : " + module.APIName); + Console.WriteLine ("Associations Module Id : " + module.Module); + } + } + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long groupId = 44024801326019; + GetAssociations_1(groupId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/GetGroup.cs b/versions/3.0.0/Samples/UserGroups/GetGroup.cs new file mode 100644 index 0000000..3862f9a --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/GetGroup.cs @@ -0,0 +1,128 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using Owner = Com.Zoho.Crm.API.UserGroups.Owner; +using ResponseHandler = Com.Zoho.Crm.API.UserGroups.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.UserGroups.ResponseWrapper; +using Source = Com.Zoho.Crm.API.UserGroups.Source; +using Sources = Com.Zoho.Crm.API.UserGroups.Sources; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.UserGroups +{ + public class GetGroup + { + public static void GetGroup_1(long groupId) + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + APIResponse response = userGroupsOperations.GetGroup(groupId); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List users = responseWrapper.UserGroups; + foreach (Com.Zoho.Crm.API.UserGroups.Groups user in users) + { + Owner createdBy = user.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("UserGroups Created By User-Name: " + createdBy.Name); + Console.WriteLine ("UserGroups Created By User-ID: " + createdBy.Id); + } + Owner modifiedBy = user.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("UserGroups Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("UserGroups Modified By User-ID: " + modifiedBy.Id); + } + Console.WriteLine ("User ModifiedTime: " + user.ModifiedTime); + Console.WriteLine ("User CreatedTime: " + user.CreatedTime); + Console.WriteLine ("UserGroups Description: " + user.Description); + Console.WriteLine ("UserGroups Id: " + user.Id); + Console.WriteLine ("UserGroups Name: " + user.Name); + List sources = user.Sources; + if (sources != null) + { + sources.ForEach(source => + { + Console.WriteLine ("UserGroups Sources Type: " + source.Type.Value); + Source source1 = source.Source; + if (source1 != null) + { + Console.WriteLine ("UserGroups Sources Id: " + source1.Id); + } + Console.WriteLine ("UserGroups Sources Subordinates: " + source.Subordinates); + Console.WriteLine ("UserGroups Sources SubTerritories: " + source.SubTerritories); + }); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long groupId = 440248001307102; + GetGroup_1(groupId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/GetGroupedCounts.cs b/versions/3.0.0/Samples/UserGroups/GetGroupedCounts.cs new file mode 100644 index 0000000..96b30a2 --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/GetGroupedCounts.cs @@ -0,0 +1,119 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using ResponseHandler = Com.Zoho.Crm.API.UserGroups.ResponseHandler; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; +using Com.Zoho.Crm.API; +using static Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.UserGroups; + +namespace Samples.UserGroups +{ + public class GetGroupedCounts + { + public static void GetGroupedCounts_1(long groupId) + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(GetGroupedCountsParam.GROUP_BY, "status"); + APIResponse response = userGroupsOperations.GetGroupedCounts(groupId, paramInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is GroupedCountWrapper) + { + GroupedCountWrapper responseWrapper = (GroupedCountWrapper) responseHandler; + List groupedCounts = responseWrapper.GroupedCounts; + foreach (GroupedCount groupedCount in groupedCounts) + { + Console.WriteLine("User Status: " + groupedCount.Status.Value); + Console.WriteLine("User Count: " + groupedCount.Count); + } + Info info = responseWrapper.Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine("User Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine("User Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine("User Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine("User Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long groupId = 44024801326019; + GetGroupedCounts_1(groupId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} diff --git a/versions/3.0.0/Samples/UserGroups/GetGroups.cs b/versions/3.0.0/Samples/UserGroups/GetGroups.cs new file mode 100644 index 0000000..9bdbe1a --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/GetGroups.cs @@ -0,0 +1,159 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using Info = Com.Zoho.Crm.API.UserGroups.Info; +using Owner = Com.Zoho.Crm.API.UserGroups.Owner; +using ResponseHandler = Com.Zoho.Crm.API.UserGroups.ResponseHandler; +using ResponseWrapper = Com.Zoho.Crm.API.UserGroups.ResponseWrapper; +using Source = Com.Zoho.Crm.API.UserGroups.Source; +using Sources = Com.Zoho.Crm.API.UserGroups.Sources; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Criteria = Com.Zoho.Crm.API.UserGroups.Criteria; +using Field = Com.Zoho.Crm.API.UserGroups.Field; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; +using static Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; + +namespace Samples.UserGroups +{ + public class GetGroups + { + public static void GetGroups_1() + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + Criteria criteria = new Criteria(); + criteria.Comparator = "equal"; + Field field = new Field(); + field.APIName = "name"; + criteria.Field = field; + criteria.Value = "group"; + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(GetGroupsParam.FILTERS, criteria); + APIResponse response = userGroupsOperations.GetGroups(paramInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List users = responseWrapper.UserGroups; + foreach (Com.Zoho.Crm.API.UserGroups.Groups user in users) + { + Owner createdBy = user.CreatedBy; + if (createdBy != null) + { + Console.WriteLine ("UserGroups Created By User-Name: " + createdBy.Name); + Console.WriteLine ("UserGroups Created By User-ID: " + createdBy.Id); + } + Owner modifiedBy = user.ModifiedBy; + if (modifiedBy != null) + { + Console.WriteLine ("UserGroups Modified By User-Name: " + modifiedBy.Name); + Console.WriteLine ("UserGroups Modified By User-ID: " + modifiedBy.Id); + } + Console.WriteLine ("User ModifiedTime: " + user.ModifiedTime); + Console.WriteLine ("User CreatedTime: " + user.CreatedTime); + Console.WriteLine ("UserGroups Description: " + user.Description); + Console.WriteLine ("UserGroups Id: " + user.Id); + Console.WriteLine ("UserGroups Name: " + user.Name); + List sources = user.Sources; + if (sources != null) + { + sources.ForEach(source => + { + Console.WriteLine ("UserGroups Sources Type: " + source.Type.Value); + Source source1 = source.Source; + if (source1 != null) + { + Console.WriteLine ("UserGroups Sources Id: " + source1.Id); + } + Console.WriteLine ("UserGroups Sources Subordinates: " + source.Subordinates); + Console.WriteLine ("UserGroups Sources SubTerritories: " + source.SubTerritories); + }); + } + } + Info info = responseWrapper.Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine ("User Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine ("User Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine ("User Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine ("User Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetGroups_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/GetSources.cs b/versions/3.0.0/Samples/UserGroups/GetSources.cs new file mode 100644 index 0000000..06b8d8e --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/GetSources.cs @@ -0,0 +1,126 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Com.Zoho.Crm.API; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using Info = Com.Zoho.Crm.API.UserGroups.Info; +using ResponseHandler = Com.Zoho.Crm.API.UserGroups.ResponseHandler; +using Source = Com.Zoho.Crm.API.UserGroups.Source; +using Sources = Com.Zoho.Crm.API.UserGroups.Sources; +using SourcesWrapper = Com.Zoho.Crm.API.UserGroups.SourcesWrapper; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.UserGroups +{ + public class GetSources + { + public static void GetSources_1(long groupId) + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + ParameterMap paramInstance = new ParameterMap(); + APIResponse response = userGroupsOperations.GetSources(groupId, paramInstance); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is SourcesWrapper) + { + SourcesWrapper responseWrapper = (SourcesWrapper) responseHandler; + List sources = responseWrapper.Sources; + foreach (Sources source in sources) + { + Source source1 = source.Source; + if (source1 != null) + { + Console.WriteLine ("Sources User-Name: " + source1.Name); + Console.WriteLine ("Sources User-ID: " + source1.Id); + } + Console.WriteLine ("Sources Type: " + source.Type.Value); + Console.WriteLine ("Sources Subordinates: " + source.Subordinates); + } + Info info = responseWrapper.Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine ("Sources Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine ("Sources Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine ("Sources Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine ("Sources Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long groupId = 440248001219057; + GetSources_1(groupId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/GetSourcesCount.cs b/versions/3.0.0/Samples/UserGroups/GetSourcesCount.cs new file mode 100644 index 0000000..eb6fc2c --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/GetSourcesCount.cs @@ -0,0 +1,104 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using ResponseHandler = Com.Zoho.Crm.API.UserGroups.ResponseHandler; +using SourcesCount = Com.Zoho.Crm.API.UserGroups.SourcesCount; +using SourcesCountWrapper = Com.Zoho.Crm.API.UserGroups.SourcesCountWrapper; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + + +namespace Samples.UserGroups +{ + public class GetSourcesCount + { + public static void GetSourcesCount_1(long groupId) + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + APIResponse response = userGroupsOperations.GetSourcesCount(groupId); + if (response != null) + { + Console.WriteLine ("Status Code: " + response.StatusCode); + if (new List(){ 204, 304}.Contains(response.StatusCode)) + { + Console.WriteLine (response.StatusCode == 204 ? "No Content" : "Not Modified"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is SourcesCountWrapper) + { + SourcesCountWrapper responseWrapper = (SourcesCountWrapper) responseHandler; + List sourcesCount = responseWrapper.SourcesCount; + foreach (SourcesCount count in sourcesCount) + { + Console.WriteLine ("Sources Count Territories: " + count.Territories); + Console.WriteLine ("Sources Count Roles: " + count.Roles); + Console.WriteLine ("Sources Count Groups: " + count.Groups); + Com.Zoho.Crm.API.UserGroups.Users users = count.Users; + if (users != null) + { + Console.WriteLine ("Sources Users Inactive: " + users.Inactive); + Console.WriteLine ("Sources Users Deleted: " + users.Deleted); + Console.WriteLine ("Sources Users Groups: " + users.Active); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long groupId = 347706117236002; + GetSourcesCount_1(groupId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/UserGroups/UpdateGroup.cs b/versions/3.0.0/Samples/UserGroups/UpdateGroup.cs new file mode 100644 index 0000000..dd4ffa1 --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/UpdateGroup.cs @@ -0,0 +1,130 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using ActionHandler = Com.Zoho.Crm.API.UserGroups.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.UserGroups.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.UserGroups.ActionWrapper; +using SuccessResponse = Com.Zoho.Crm.API.UserGroups.SuccessResponse; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using BodyWrapper = Com.Zoho.Crm.API.UserGroups.BodyWrapper; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + +namespace Samples.UserGroups +{ + public class UpdateGroup + { + public static void UpdateGroup_1(long groupId) + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + BodyWrapper request = new BodyWrapper(); + List userList = new List(); + Com.Zoho.Crm.API.UserGroups.Groups user1 = new Com.Zoho.Crm.API.UserGroups.Groups(); + user1.Name = "test group"; + user1.Description = "my group"; + List sources = new List(); + Com.Zoho.Crm.API.UserGroups.Sources source = new Com.Zoho.Crm.API.UserGroups.Sources(); + source.Type = new Choice("users"); + Com.Zoho.Crm.API.UserGroups.Source source1 = new Com.Zoho.Crm.API.UserGroups.Source(); + source1.Id = 4402480254001; + source.Source = source1; + sources.Add(source); + user1.Sources = sources; + userList.Add(user1); + request.UserGroups = userList; + APIResponse response = userGroupsOperations.UpdateGroup(groupId, request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper responseWrapper = (ActionWrapper) actionHandler; + List actionResponses = responseWrapper.UserGroups; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long groupId = 440248001279024l; + UpdateGroup_1(groupId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} diff --git a/versions/3.0.0/Samples/UserGroups/UpdateGroups.cs b/versions/3.0.0/Samples/UserGroups/UpdateGroups.cs new file mode 100644 index 0000000..9da4bf3 --- /dev/null +++ b/versions/3.0.0/Samples/UserGroups/UpdateGroups.cs @@ -0,0 +1,130 @@ +using System; +using System.Reflection; +using System.Collections.Generic; +using Com.Zoho.API.Authenticator; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using APIException = Com.Zoho.Crm.API.UserGroups.APIException; +using ActionHandler = Com.Zoho.Crm.API.UserGroups.ActionHandler; +using ActionResponse = Com.Zoho.Crm.API.UserGroups.ActionResponse; +using ActionWrapper = Com.Zoho.Crm.API.UserGroups.ActionWrapper; +using SuccessResponse = Com.Zoho.Crm.API.UserGroups.SuccessResponse; +using UserGroupsOperations = Com.Zoho.Crm.API.UserGroups.UserGroupsOperations; +using BodyWrapper = Com.Zoho.Crm.API.UserGroups.BodyWrapper; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.Dc; +using Newtonsoft.Json; + +namespace Samples.UserGroups +{ + public class UpdateGroups + { + public static void UpdateGroups_1() + { + UserGroupsOperations userGroupsOperations = new UserGroupsOperations(); + BodyWrapper request = new BodyWrapper(); + List userList = new List(); + Com.Zoho.Crm.API.UserGroups.Groups user1 = new Com.Zoho.Crm.API.UserGroups.Groups(); + user1.Id = 31242354353423l; + user1.Name = "test group"; + user1.Description = "my group"; + List sources = new List(); + Com.Zoho.Crm.API.UserGroups.Sources source = new Com.Zoho.Crm.API.UserGroups.Sources(); + source.Type = new Choice("users"); + Com.Zoho.Crm.API.UserGroups.Source source1 = new Com.Zoho.Crm.API.UserGroups.Source(); + source1.Id = 4402480254001; + source.Source = source1; + sources.Add(source); + user1.Sources = sources; + userList.Add(user1); + request.UserGroups = userList; + APIResponse response = userGroupsOperations.UpdateGroups(request); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper responseWrapper = (ActionWrapper) actionHandler; + List actionResponses = responseWrapper.UserGroups; + foreach (ActionResponse actionResponse in actionResponses) + { + if (actionResponse is SuccessResponse) + { + SuccessResponse successResponse = (SuccessResponse) actionResponse; + Console.WriteLine ("Status: " + successResponse.Status.Value); + Console.WriteLine ("Code: " + successResponse.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in successResponse.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + successResponse.Message); + } + else if (actionResponse is APIException) + { + APIException exception = (APIException) actionResponse; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine ("Status: " + exception.Status.Value); + Console.WriteLine ("Code: " + exception.Code.Value); + Console.WriteLine ("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine (entry.Key + ": " + entry.Value); + } + Console.WriteLine ("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL" ).Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + UpdateGroups_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/Samples/ZiaOrgEnrichment1/CreateZiaOrgEnrichment.cs b/versions/3.0.0/Samples/ZiaOrgEnrichment1/CreateZiaOrgEnrichment.cs new file mode 100644 index 0000000..28adcd1 --- /dev/null +++ b/versions/3.0.0/Samples/ZiaOrgEnrichment1/CreateZiaOrgEnrichment.cs @@ -0,0 +1,123 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.ZiaOrgEnrichment; +using System.Collections.Generic; +using Com.Zoho.Crm.API; +using static Com.Zoho.Crm.API.ZiaOrgEnrichment.ZiaOrgEnrichmentOperations; +using Com.Zoho.Crm.API.Util; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; + +namespace Samples.ZiaOrgEnrichment1 +{ + public class CreateZiaOrgEnrichment + { + public static void CreateZiaOrgEnrichment_1() + { + ZiaOrgEnrichmentOperations ziaOrgEnrichmentOperations = new ZiaOrgEnrichmentOperations(); + BodyWrapper request = new BodyWrapper(); + List ziaorgenrichment = new List(); + ZiaOrgEnrichment ziaorgenrichment1 = new ZiaOrgEnrichment(); + EnrichBasedOn enrichBasedOn = new EnrichBasedOn(); + enrichBasedOn.Name = "zoho"; + enrichBasedOn.Email = "sales@zohocorp.com"; + enrichBasedOn.Website = "www.zoho.com"; + ziaorgenrichment1.EnrichBasedOn = enrichBasedOn; + ziaorgenrichment.Add(ziaorgenrichment1); + request.Ziaorgenrichment = ziaorgenrichment; + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(CreateZiaOrgEnrichmentParam.MODULE, "Vendors"); + APIResponse response = ziaOrgEnrichmentOperations.CreateZiaOrgEnrichment(request, paramInstance); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionresponses = actionWrapper.Ziaorgenrichment; + foreach (ActionResponse actionresponse in actionresponses) + { + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse) actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException) actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + CreateZiaOrgEnrichment_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/ZiaOrgEnrichment1/GetZiaOrgEnrichment.cs b/versions/3.0.0/Samples/ZiaOrgEnrichment1/GetZiaOrgEnrichment.cs new file mode 100644 index 0000000..9610829 --- /dev/null +++ b/versions/3.0.0/Samples/ZiaOrgEnrichment1/GetZiaOrgEnrichment.cs @@ -0,0 +1,219 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.ZiaOrgEnrichment; +using System.Collections.Generic; +using System.Reflection; +using Newtonsoft.Json; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; + +namespace Samples.ZiaOrgEnrichment1 +{ + public class GetZiaOrgEnrichment + { + public static void GetZiaOrgEnrichment_1(long ziaOrgEnrichmentId) + { + ZiaOrgEnrichmentOperations ziaOrgEnrichmentOperations = new ZiaOrgEnrichmentOperations(); + APIResponse response = ziaOrgEnrichmentOperations.GetZiaOrgEnrichment(ziaOrgEnrichmentId); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.StatusCode == 204) + { + Console.WriteLine("No Content"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List ziaorgenrichment = responseWrapper.Ziaorgenrichment; + if(ziaorgenrichment != null) + { + foreach(ZiaOrgEnrichment ziaorgenrichment1 in ziaorgenrichment) + { + EnrichedData enrichedData = ziaorgenrichment1.EnrichedData; + if(enrichedData != null) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData OrgStatus : " + enrichedData.OrgStatus); + List description = enrichedData.Description; + if(description != null) + { + foreach (Description description1 in description) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData Title : " + description1.Title); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Description : " + description1.Description_1); + } + } + Console.WriteLine("ZiaOrgEnrichment EnrichedData CEO : " + enrichedData.Ceo); + Console.WriteLine("ZiaOrgEnrichment EnrichedData SecondaryEmail : " + enrichedData.SecondaryEmail); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Revenue : " + enrichedData.Revenue); + Console.WriteLine("ZiaOrgEnrichment EnrichedData YearsInIndustry : " + enrichedData.YearsInIndustry); + List otherContacts = enrichedData.OtherContacts; + if(otherContacts != null) + { + foreach (string otherContact in otherContacts) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData OtherContacts : " + otherContact); + } + } + Console.WriteLine("ZiaOrgEnrichment EnrichedData TechnoGraphicData : " + enrichedData.TechnoGraphicData); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Logo : " + enrichedData.Logo); + Console.WriteLine("ZiaOrgEnrichment EnrichedData SecondaryContact : " + enrichedData.SecondaryContact); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Id: " + enrichedData.Id); + List otherEmails = enrichedData.OtherEmails; + if(otherEmails != null) + { + foreach (string otherEmail in otherEmails) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData OtherEmails : " + otherEmail); + } + } + + Console.WriteLine("ZiaOrgEnrichment EnrichedData SignIn : " + enrichedData.SignIn); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Website : " + enrichedData.Website); + + List
address = enrichedData.Address; + if(address != null) + { + foreach (Address address1 in address) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData Address Country : " + address1.Country); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Address City : " + address1.City); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Address PinCode : " + address1.PinCode); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Address State : " + address1.State); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Address FillAddress : " + address1.FillAddress); + } + } + Console.WriteLine("ZiaOrgEnrichment EnrichedData SignUp : " + enrichedData.SignUp); + Console.WriteLine("ZiaOrgEnrichment EnrichedData OrgType : " + enrichedData.OrgType); + List
headQuarters = enrichedData.HeadQuarters; + if(headQuarters != null) + { + foreach (Address headQuarters1 in headQuarters) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData HeadQuarters Country : " + headQuarters1.Country); + Console.WriteLine("ZiaOrgEnrichment EnrichedData HeadQuarters City : " + headQuarters1.City); + Console.WriteLine("ZiaOrgEnrichment EnrichedData HeadQuarters PinCode : " + headQuarters1.PinCode); + Console.WriteLine("ZiaOrgEnrichment EnrichedData HeadQuarters State : " + headQuarters1.State); + Console.WriteLine("ZiaOrgEnrichment EnrichedData HeadQuarters FillAddress : " + headQuarters1.FillAddress); + } + } + Console.WriteLine("ZiaOrgEnrichment EnrichedData NoOfEmployees : " + enrichedData.NoOfEmployees); + List territoryList = enrichedData.TerritoryList; + if(territoryList != null) + { + foreach (string territory in territoryList) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData TerritoryList : " + territory); + } + } + Console.WriteLine("ZiaOrgEnrichment EnrichedData FoundingYear : " + enrichedData.FoundingYear); + List industries = enrichedData.Industries; + if(industries != null) + { + foreach (Industry industry in industries) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData Industries Name : " + industry.Name); + Console.WriteLine("ZiaOrgEnrichment EnrichedData Industries Description : " + industry.Description); + } + } + Console.WriteLine("ZiaOrgEnrichment EnrichedData Name : " + enrichedData.Name); + Console.WriteLine("ZiaOrgEnrichment EnrichedData PrimaryEmail : " + enrichedData.PrimaryEmail); + List businessModel = enrichedData.BusinessModel; + if(businessModel != null) + { + foreach (string businessModel1 in businessModel) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData BusinessModel : " + businessModel1); + } + } + Console.WriteLine("ZiaOrgEnrichment EnrichedData PrimaryContact : " + enrichedData.PrimaryContact); + List socialMedia = enrichedData.SocialMedia; + if(socialMedia != null) + { + foreach (SocialMedia socialMedia1 in socialMedia) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData SocialMedia MediaType : " + socialMedia1.MediaType); + List mediaUrl = socialMedia1.MediaUrl; + if(mediaUrl != null) + { + foreach (String mediaUrl1 in mediaUrl) + { + Console.WriteLine("ZiaOrgEnrichment EnrichedData SocialMedia MediaUrl: " + mediaUrl1); + } + } + } + } + } + + EnrichBasedOn enrichBasedOn = ziaorgenrichment1.EnrichBasedOn; + if(enrichBasedOn != null) + { + Console.WriteLine("ZiaOrgEnrichment EnrichBasedOn Name : " + enrichBasedOn.Name); + Console.WriteLine("ZiaOrgEnrichment EnrichBasedOn Email : " + enrichBasedOn.Email); + Console.WriteLine("ZiaOrgEnrichment EnrichBasedOn Website : " + enrichBasedOn.Website); + } + + Console.WriteLine("ZiaOrgEnrichment Id : " + ziaorgenrichment1.Id); + Console.WriteLine("ZiaOrgEnrichment Status : " + ziaorgenrichment1.Status); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else if (response.StatusCode != 204) + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long ziaOrgEnrichmentId = 34794003; + GetZiaOrgEnrichment_1(ziaOrgEnrichmentId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/ZiaOrgEnrichment1/GetZiaOrgEnrichments.cs b/versions/3.0.0/Samples/ZiaOrgEnrichment1/GetZiaOrgEnrichments.cs new file mode 100644 index 0000000..17f78de --- /dev/null +++ b/versions/3.0.0/Samples/ZiaOrgEnrichment1/GetZiaOrgEnrichments.cs @@ -0,0 +1,125 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.ZiaOrgEnrichment; +using Com.Zoho.Crm.API; +using System.Collections.Generic; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; + +namespace Samples.ZiaOrgEnrichment1 +{ + public class GetZiaOrgEnrichments + { + public static void GetZiaOrgEnrichments_1() + { + ZiaOrgEnrichmentOperations ziaOrgEnrichmentOperations = new ZiaOrgEnrichmentOperations(); + ParameterMap paramInstance = new ParameterMap(); + APIResponse response = ziaOrgEnrichmentOperations.GetZiaOrgEnrichments(paramInstance); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.StatusCode == 204) + { + Console.WriteLine("No Content"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List ziaorgenrichment = responseWrapper.Ziaorgenrichment; + if(ziaorgenrichment != null) + { + foreach(ZiaOrgEnrichment ziaorgenrichment1 in ziaorgenrichment) + { + Console.WriteLine("ZiaOrgEnrichment CreatedTime : " + ziaorgenrichment1.CreatedTime); + Console.WriteLine("ZiaOrgEnrichment Id : " + ziaorgenrichment1.Id); + User user = ziaorgenrichment1.CreatedBy; + if(user != null) + { + Console.WriteLine("ZiaOrgEnrichment User Id : " + user.Id); + Console.WriteLine("ZiaOrgEnrichment User Name : " + user.Name); + } + Console.WriteLine("ZiaOrgEnrichment Status : " + ziaorgenrichment1.Status); + } + } + + Info info = responseWrapper.Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine("ZiaOrgEnrichment Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine("ZiaOrgEnrichment Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine("ZiaOrgEnrichment Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine("ZiaOrgEnrichment Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else if (response.StatusCode != 204) + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetZiaOrgEnrichments_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/ZiaPeopleEnrichment1/CreateZiaPeopleEnrichment.cs b/versions/3.0.0/Samples/ZiaPeopleEnrichment1/CreateZiaPeopleEnrichment.cs new file mode 100644 index 0000000..11ad594 --- /dev/null +++ b/versions/3.0.0/Samples/ZiaPeopleEnrichment1/CreateZiaPeopleEnrichment.cs @@ -0,0 +1,131 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.ZiaPeopleEnrichment; +using System.Collections.Generic; +using Com.Zoho.Crm.API; +using static Com.Zoho.Crm.API.ZiaPeopleEnrichment.ZiaPeopleEnrichmentOperations; +using Com.Zoho.Crm.API.Util; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; + +namespace Samples.ZiaPeopleEnrichment1 +{ + public class CreateZiaPeopleEnrichment + { + public static void CreateZiaPeopleEnrichment_1() + { + ZiaPeopleEnrichmentOperations ziaPeopleEnrichmentOperations = new ZiaPeopleEnrichmentOperations(); + BodyWrapper request = new BodyWrapper(); + List ziapeopleenrichment = new List(); + ZiaPeopleEnrichment ziapeopleenrichment1 = new ZiaPeopleEnrichment(); + EnrichBasedOn enrichBasedOn = new EnrichBasedOn(); + enrichBasedOn.Name = "zoho"; + enrichBasedOn.Email = "sales@zohocorp.com"; + Company company = new Company(); + company.Name = "zoho"; + company.Website = "www.zoho.com"; + enrichBasedOn.Company = company; + Social social = new Social(); + social.Facebook = "facebook.com/zoho"; + social.Linkedin = "linkedin.com/zoho"; + social.Twitter = "twitter.com/zoho"; + enrichBasedOn.Social = social; + ziapeopleenrichment1.EnrichBasedOn = enrichBasedOn; + ziapeopleenrichment.Add(ziapeopleenrichment1); + request.Ziapeopleenrichment = ziapeopleenrichment; + ParameterMap paramInstance = new ParameterMap(); + paramInstance.Add(CreateZiaPeopleEnrichmentParam.MODULE, "Leads"); + APIResponse response = ziaPeopleEnrichmentOperations.CreateZiaPeopleEnrichment(request, paramInstance); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.IsExpected) + { + ActionHandler actionHandler = response.Object; + if (actionHandler is ActionWrapper) + { + ActionWrapper actionWrapper = (ActionWrapper) actionHandler; + List actionresponses = actionWrapper.Ziapeopleenrichment; + foreach (ActionResponse actionresponse in actionresponses) + { + if (actionresponse is SuccessResponse) + { + SuccessResponse successresponse = (SuccessResponse)actionresponse; + Console.WriteLine("Status: " + successresponse.Status.Value); + Console.WriteLine("Code: " + successresponse.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in successresponse.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + successresponse.Message); + } + else if (actionresponse is APIException) + { + APIException exception = (APIException) actionresponse; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + } + else if (actionHandler is APIException) + { + APIException exception = (APIException) actionHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + CreateZiaPeopleEnrichment_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/ZiaPeopleEnrichment1/GetZiaPeopleEnrichment.cs b/versions/3.0.0/Samples/ZiaPeopleEnrichment1/GetZiaPeopleEnrichment.cs new file mode 100644 index 0000000..b7c38eb --- /dev/null +++ b/versions/3.0.0/Samples/ZiaPeopleEnrichment1/GetZiaPeopleEnrichment.cs @@ -0,0 +1,230 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.Util; +using Com.Zoho.Crm.API.ZiaPeopleEnrichment; +using System.Collections.Generic; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; + +namespace Samples.ZiaPeopleEnrichment1 +{ + public class GetZiaPeopleEnrichment + { + public static void GetZiaPeopleEnrichment_1(long ziaPeopleEnrichmentId) + { + ZiaPeopleEnrichmentOperations ziaPeopleEnrichmentOperations = new ZiaPeopleEnrichmentOperations(); + APIResponse response = ziaPeopleEnrichmentOperations.GetZiaPeopleEnrichment(ziaPeopleEnrichmentId); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.StatusCode == 204) + { + Console.WriteLine("No Content"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List ziapeopleenrichment = responseWrapper.Ziapeopleenrichment; + if(ziapeopleenrichment != null) + { + foreach(ZiaPeopleEnrichment ziapeopleenrichment1 in ziapeopleenrichment) + { + EnrichedData enrichedData = ziapeopleenrichment1.EnrichedData; + if(enrichedData != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Website : " + enrichedData.Website); + List emailInfos = enrichedData.EmailInfos; + if(emailInfos != null) + { + foreach(EmailInfo emailInfo in emailInfos) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData EmailInfo Type : " + emailInfo.Type); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData EmailInfo Email : " + emailInfo.Email); + } + } + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Gender : " + enrichedData.Gender); + CompanyInfo companyInfo = enrichedData.CompanyInfo; + if(companyInfo != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Name : " + companyInfo.Name); + List industries = companyInfo.Industries; + if(industries != null) + { + foreach(Industry industry in industries) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Industries Name : " + industry.Name); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Industries Description : " + industry.Description); + } + } + + List experiences = companyInfo.Experiences; + if(experiences != null) + { + foreach(Experience experience in experiences) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Experience EndDate : " + experience.EndDate); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Experience CompanyName : " + experience.CompanyName); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Experience Title : " + experience.Title); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Experience StartDate : " + experience.StartDate); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData CompanyInfo Experience Primary : " + experience.Primary); + } + } + } + Console.WriteLine("ZiaPeopleEnrichment EnrichedData LastName : " + enrichedData.LastName); + List educations = enrichedData.Educations; + if(educations != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Educations : "); + Console.WriteLine(educations); + } + Console.WriteLine("ZiaPeopleEnrichment EnrichedData MiddleName : " + enrichedData.MiddleName); + List skills = enrichedData.Skills; + if(skills != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Skills : "); + Console.WriteLine(skills); + } + List otherContacts = enrichedData.OtherContacts; + if(otherContacts != null) + { + foreach(string otherContact in otherContacts) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData OtherContacts : " + otherContact); + } + } + List
addressListInfo = enrichedData.AddressListInfo; + if(addressListInfo != null) + { + foreach(Address addressListInfo1 in addressListInfo) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData AddressListInfo Continent : " + addressListInfo1.Continent); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData AddressListInfo Country : " + addressListInfo1.Country); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData AddressListInfo Name : " + addressListInfo1.Name); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData AddressListInfo Region : " + addressListInfo1.Region); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData AddressListInfo Primary : " + addressListInfo1.Primary); + } + } + Address primaryAddressInfo = enrichedData.PrimaryAddressInfo; + if(primaryAddressInfo != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData PrimaryAddressInfo Continent : " + primaryAddressInfo.Continent); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData PrimaryAddressInfo Country : " + primaryAddressInfo.Country); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData PrimaryAddressInfo Name : " + primaryAddressInfo.Name); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData PrimaryAddressInfo Region : " + primaryAddressInfo.Region); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData PrimaryAddressInfo Primary : " + primaryAddressInfo.Primary); + } + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Name : " + enrichedData.Name); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData SecondaryContact : " + enrichedData.SecondaryContact); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData PrimaryEmail : " + enrichedData.PrimaryEmail); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Designation : " + enrichedData.Designation); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Id : " + enrichedData.Id); + List interests = enrichedData.Interests; + if(interests != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData Interests : "); + Console.WriteLine(interests); + } + Console.WriteLine("ZiaPeopleEnrichment EnrichedData FirstName : " + enrichedData.FirstName); + Console.WriteLine("ZiaPeopleEnrichment EnrichedData PrimaryContact : " + enrichedData.PrimaryContact); + List socialMedia = enrichedData.SocialMedia; + if(socialMedia != null) + { + foreach(SocialMedia socialMedia1 in socialMedia) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData SocialMedia MediaType : " + socialMedia1.MediaType); + List mediaUrl = socialMedia1.MediaUrl; + if(mediaUrl != null) + { + foreach(String mediaUrl1 in mediaUrl) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichedData SocialMedia MediaUrl: " + mediaUrl1); + } + } + } + } + } + EnrichBasedOn enrichBasedOn = ziapeopleenrichment1.EnrichBasedOn; + if(enrichBasedOn != null) + { + Social social = enrichBasedOn.Social; + if(social != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichBasedOn Social Facebook : " + social.Facebook); + Console.WriteLine("ZiaPeopleEnrichment EnrichBasedOn Social Linkedin : " + social.Linkedin); + Console.WriteLine("ZiaPeopleEnrichment EnrichBasedOn Social Twitter : " + social.Twitter); + } + Console.WriteLine("ZiaPeopleEnrichment EnrichBasedOn Name : " + enrichBasedOn.Name); + Company company = enrichBasedOn.Company; + if(company != null) + { + Console.WriteLine("ZiaPeopleEnrichment EnrichBasedOn Company Website : " + company.Website); + Console.WriteLine("ZiaPeopleEnrichment EnrichBasedOn Company Name : " + company.Name); + } + Console.WriteLine("ZiaPeopleEnrichment EnrichBasedOn Email : " + enrichBasedOn.Email); + } + + Console.WriteLine("ZiaPeopleEnrichment Id : " + ziapeopleenrichment1.Id); + Console.WriteLine("ZiaPeopleEnrichment Status : " + ziapeopleenrichment1.Status); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else if (response.StatusCode != 204) + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + long ziaPeopleEnrichmentId = 34794003l; + GetZiaPeopleEnrichment_1(ziaPeopleEnrichmentId); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/Samples/ZiaPeopleEnrichment1/GetZiaPeopleEnrichments.cs b/versions/3.0.0/Samples/ZiaPeopleEnrichment1/GetZiaPeopleEnrichments.cs new file mode 100644 index 0000000..d086d96 --- /dev/null +++ b/versions/3.0.0/Samples/ZiaPeopleEnrichment1/GetZiaPeopleEnrichments.cs @@ -0,0 +1,124 @@ +using System; +using Initializer = Com.Zoho.Crm.API.Initializer; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; +using Com.Zoho.Crm.API.ZiaPeopleEnrichment; +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; +using System.Reflection; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.API.Authenticator; +using Newtonsoft.Json; + +namespace Samples.ZiaPeopleEnrichment1 +{ + public class GetZiaPeopleEnrichments + { + public static void GetZiaPeopleEnrichments_1() + { + ZiaPeopleEnrichmentOperations ziaPeopleEnrichmentOperations = new ZiaPeopleEnrichmentOperations(); + ParameterMap paramInstance = new ParameterMap(); + APIResponse response = ziaPeopleEnrichmentOperations.GetZiaPeopleEnrichments(paramInstance); + if (response != null) + { + Console.WriteLine("Status Code: " + response.StatusCode); + if (response.StatusCode == 204) + { + Console.WriteLine("No Content"); + return; + } + if (response.IsExpected) + { + ResponseHandler responseHandler = response.Object; + if (responseHandler is ResponseWrapper) + { + ResponseWrapper responseWrapper = (ResponseWrapper) responseHandler; + List ziapeopleenrichment = responseWrapper.Ziapeopleenrichment; + if(ziapeopleenrichment != null) + { + foreach(ZiaPeopleEnrichment ziapeopleenrichment1 in ziapeopleenrichment) + { + Console.WriteLine("ZiaPeopleEnrichment CreatedTime : " + ziapeopleenrichment1.CreatedTime); + Console.WriteLine("ZiaPeopleEnrichment Id : " + ziapeopleenrichment1.Id); + User user = ziapeopleenrichment1.CreatedBy; + if(user != null) + { + Console.WriteLine("ZiaPeopleEnrichment User Id : " + user.Id); + Console.WriteLine("ZiaPeopleEnrichment User Name : " + user.Name); + } + Console.WriteLine("ZiaPeopleEnrichment Status : " + ziapeopleenrichment1.Status); + } + } + Info info = responseWrapper.Info; + if (info != null) + { + if (info.PerPage != null) + { + Console.WriteLine("ZiaPeopleEnrichment Info PerPage: " + info.PerPage); + } + if (info.Count != null) + { + Console.WriteLine("ZiaPeopleEnrichment Info Count: " + info.Count); + } + if (info.Page != null) + { + Console.WriteLine("ZiaPeopleEnrichment Info Page: " + info.Page); + } + if (info.MoreRecords != null) + { + Console.WriteLine("ZiaPeopleEnrichment Info MoreRecords: " + info.MoreRecords); + } + } + } + else if (responseHandler is APIException) + { + APIException exception = (APIException) responseHandler; + Console.WriteLine("Status: " + exception.Status.Value); + Console.WriteLine("Code: " + exception.Code.Value); + Console.WriteLine("Details: "); + foreach (KeyValuePair entry in exception.Details) + { + Console.WriteLine(entry.Key + ": " + entry.Value); + } + Console.WriteLine("Message: " + exception.Message); + } + } + else if (response.StatusCode != 204) + { + Model responseObject = response.Model; + Type type = responseObject.GetType(); + Console.WriteLine("Type is : {0}", type.Name); + PropertyInfo[] props = type.GetProperties(); + Console.WriteLine("Properties (N = {0}) :", props.Length); + foreach (var prop in props) + { + if (prop.GetIndexParameters().Length == 0) + { + Console.WriteLine("{0} ({1}) in {2}", prop.Name, prop.PropertyType.Name, prop.GetValue(responseObject)); + } + else + { + Console.WriteLine("{0} ({1}) in ", prop.Name, prop.PropertyType.Name); + } + } + } + } + } + + public static void Call() + { + try + { + Environment environment = USDataCenter.PRODUCTION; + IToken token = new OAuthToken.Builder().ClientId("Client_Id").ClientSecret("Client_Secret").RefreshToken("Refresh_Token").RedirectURL("Redirect_URL").Build(); + new Initializer.Builder().Environment(environment).Token(token).Initialize(); + GetZiaPeopleEnrichments_1(); + } + catch (Exception e) + { + Console.WriteLine(JsonConvert.SerializeObject(e)); + } + } + } +} + diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/IToken.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/IToken.cs new file mode 100644 index 0000000..a3eb8d7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/IToken.cs @@ -0,0 +1,24 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.API.Authenticator +{ + /// + /// This interface verifies and sets token to APIHTTPConnector instance. + /// + public interface IToken + { + /// + /// This method to set authentication token to APIHTTPConnector instance. + /// + /// A APIHTTPConnector class instance. + public void Authenticate(APIHTTPConnector urlConnection); + + public bool Revoke(string id); + + public void Remove(); + + public void GenerateToken(); + + public string GetId(); + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/OAuthToken.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/OAuthToken.cs new file mode 100644 index 0000000..d78e5ec --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/OAuthToken.cs @@ -0,0 +1,689 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Text; +using Com.Zoho.API.Authenticator.Store; +using Com.Zoho.API.Exception; +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Dc; +using Com.Zoho.Crm.API.Logger; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json.Linq; +using Environment = Com.Zoho.Crm.API.Dc.DataCenter.Environment; + +namespace Com.Zoho.API.Authenticator +{ + /// + /// This class gets the tokens and checks the expiry time. + /// + public class OAuthToken : IToken + { + private string clientID; + private string clientSecret; + private string redirectURL; + private string grantToken; + private string refreshToken; + private string accessToken; + private string expiresIn; + private UserSignature userSignature; + private string id; + private string apiDomain; + private bool findUser; + + public OAuthToken() + { + + } + + private OAuthToken(string clientID, string clientSecret, string grantToken, string refreshToken, string redirectURL, string id, string accessToken, UserSignature userSignature, bool findUser) + { + this.clientID = clientID; + this.clientSecret = clientSecret; + this.grantToken = grantToken; + this.refreshToken = refreshToken; + this.redirectURL = redirectURL; + this.accessToken = accessToken; + this.id = id; + this.userSignature = userSignature; + this.findUser = findUser; + } + + /// + /// This is a getter method to get OAuth client id. + /// + /// A string representing the OAuth client id. + public string ClientId + { + get + { + return clientID; + } + set + { + clientID = value; + } + } + + /// + /// This is a getter method to get OAuth client secret. + /// + /// A string representing the OAuth client secret. + public string ClientSecret + { + get + { + return clientSecret; + } + set + { + clientSecret = value; + } + } + + /// + /// This is a getter method to get OAuth redirect URL. + /// + /// A string representing the OAuth redirect URL. + public string RedirectURL + { + get + { + return redirectURL; + } + set + { + redirectURL = value; + } + } + + /// + /// This is a getter method to get grant token. + /// + /// A string representing the grant token. + public string GrantToken + { + get + { + return grantToken; + } + set + { + grantToken = value; + } + } + + /// + /// Gets or sets the refresh token. + /// + /// A string containing the refresh token. + /// A string representing the refresh token. + public string RefreshToken + { + get + { + return refreshToken; + } + set + { + refreshToken = value; + } + } + + /// + /// Gets or sets the access token. + /// + /// A string containing the access token. + /// A string representing the access token. + public string AccessToken + { + get + { + return accessToken; + } + set + { + accessToken = value; + } + } + + /// + /// Gets or sets the token expire time. + /// + /// A string containing the token expire time. + /// A string representing the token expire time. + public string ExpiresIn + { + get + { + return expiresIn; + } + set + { + expiresIn = value; + } + } + + public string Id + { + get + { + return id; + } + set + { + id = value; + } + } + + public UserSignature UserSignature + { + get + { + return userSignature; + } + set + { + userSignature = value; + } + } + + public string APIDomain + { + get + { + return apiDomain; + } + set + { + apiDomain = value; + } + } + + public void GenerateToken() + { + GetToken(); + } + + public string GetToken() + { + lock (this) + { + try + { + Initializer initializer = Initializer.GetInitializer(); + ITokenStore store = initializer.Store; + OAuthToken oauthToken = null; + if (this.Id != null) + { + oauthToken = (OAuthToken)store.FindTokenById(this.Id); + MergeObjects(this, oauthToken); + oauthToken.findUser = this.findUser; + } + else + { + oauthToken = (OAuthToken)store.FindToken(this); + } + if (oauthToken == null) + { + if(this.UserSignature != null) + { + CheckTokenDetails(); + } + oauthToken = this; + } + if(oauthToken.APIDomain == null || oauthToken.APIDomain.Length <= 0) + { + if(initializer.Environment == null) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_1, Constants.ENVIRONMENT_ERROR_MESSAGE + " : "); + } + oauthToken.APIDomain = initializer.Environment.GetUrl(); + } + Environment environment = DataCenter.Get(oauthToken.APIDomain); + if(environment != null) + { + Type cl = initializer.GetType(); + try + { + FieldInfo field = GetPrivateFieldInfo(cl, Constants.ENVIRONMENT); + field.SetValue(initializer, environment); + } + catch (System.Exception e) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_RESPONSE + " : ", e); + } + } + else + { + if(initializer.Environment == null) + { + throw new SDKException(Constants.ENVIRONMENT_ERROR_1, Constants.ENVIRONMENT_ERROR_MESSAGE + " : "); + } + } + string url = initializer.Environment.GetAccountsUrl(); + bool save = false; + if (oauthToken.AccessToken == null || oauthToken.AccessToken.Length == 0) + { + if (oauthToken.RefreshToken != null && oauthToken.RefreshToken.Length > 0) + { + SDKLogger.LogInfo(Constants.ACCESS_TOKEN_USING_REFRESH_TOKEN_MESSAGE); + oauthToken.RefreshAccessToken(oauthToken, url); + } + else + { + SDKLogger.LogInfo(Constants.ACCESS_TOKEN_USING_GRANT_TOKEN_MESSAGE); + oauthToken.GenerateAccessToken(oauthToken, url); + } + save = true; + } + else if (oauthToken.ExpiresIn != null && oauthToken.ExpiresIn.Length > 0 && GetExpiryLapseInMillis(oauthToken.ExpiresIn) < 5L)//access token will expire in next 5 seconds or less + { + SDKLogger.LogInfo(Constants.REFRESH_TOKEN_MESSAGE); + oauthToken.RefreshAccessToken(oauthToken, url); + save = true; + } + else if (oauthToken.ExpiresIn == null && oauthToken.AccessToken != null && oauthToken.Id == null) + { + save = true; + } + if(save) + { + try + { + if(oauthToken.UserSignature == null && oauthToken.findUser) + { + try + { + string userName = new Utility().GetUserName(oauthToken.accessToken); + if(userName != null) + { + oauthToken.UserSignature = new UserSignature(userName); + } + } + catch (SDKException ex) + { + SDKLogger.LogError(ex); + } + } + store.SaveToken(oauthToken); + } + catch(System.Exception ex) + { + throw new SDKException(Constants.SAVE_TOKEN_ERROR, ex); + } + } + return oauthToken.AccessToken; + } + catch (System.Exception ex) when (!(ex is SDKException)) + { + throw new SDKException(ex); + } + } + } + + private bool CheckTokenDetails() + { + if (AreAllObjectsNull(this.grantToken, this.refreshToken)) + { + throw new SDKException(Constants.MANDATORY_VALUE_ERROR, Constants.GET_TOKEN_BY_USER_NAME_ERROR + " - " + string.Join(", ", Constants.OAUTH_MANDATORY_KEYS2)); + } + return true; + } + + public void Authenticate(APIHTTPConnector urlConnection) + { + if(!urlConnection.Headers.ContainsKey(Constants.AUTHORIZATION)) + { + urlConnection.AddHeader(Constants.AUTHORIZATION, Constants.OAUTH_HEADER_PREFIX + GetToken()); + } + } + + private string GetResponseFromServer(Dictionary requestParams, string url) + { + try + { + string USER_AGENT = Constants.USER_AGENT; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + string urlParameters = null; + if (requestParams != null && requestParams.Count != 0) + { + foreach (KeyValuePair param in requestParams) + { + if (urlParameters == null) + { + urlParameters = param.Key + "=" + param.Value; + } + else + { + urlParameters += "&" + param.Key + "=" + param.Value; + } + } + } + request.UserAgent = USER_AGENT; + var data = Encoding.UTF8.GetBytes(urlParameters); + request.ContentType = Constants.URL_ENCODEED; + request.ContentLength = data.Length; + request.Method = Constants.REQUEST_METHOD_POST; + using (var dataStream = request.GetRequestStream()) + { + dataStream.Write(data, 0, data.Length); + } + var response = (HttpWebResponse)request.GetResponse(); + return new StreamReader(response.GetResponseStream()).ReadToEnd(); + } + catch (System.Exception ex) + { + throw new SDKException(ex); + } + } + + public string ToString(string url) + { + StringBuilder requestStringBuilder = new StringBuilder(); + requestStringBuilder.Append("POST - "); + requestStringBuilder.Append(Constants.URL).Append(" = ").Append(url.ToString()).Append("."); + return requestStringBuilder.ToString(); + } + + private OAuthToken RefreshAccessToken(OAuthToken oauthToken, string url) + { + try + { + Dictionary requestParams = new Dictionary + { + { Constants.CLIENT_ID, oauthToken.ClientId }, + { Constants.CLIENT_SECRET, oauthToken.ClientSecret }, + { Constants.GRANT_TYPE, Constants.REFRESH_TOKEN }, + { Constants.REFRESH_TOKEN, oauthToken.RefreshToken } + }; + ParseResponse(oauthToken, GetResponseFromServer(requestParams, url)); + } + catch (System.Exception ex) when (!(ex is SDKException)) + { + throw new SDKException(Constants.REFRESH_TOKEN_ERROR, ex); + } + return oauthToken; + } + + private OAuthToken GenerateAccessToken(OAuthToken oauthToken, string url) + { + try + { + Dictionary requestParams = new Dictionary + { + { Constants.CLIENT_ID, oauthToken.ClientId }, + { Constants.CLIENT_SECRET, oauthToken.ClientSecret } + }; + if (oauthToken.RedirectURL != null) + { + requestParams.Add(Constants.REDIRECT_URI, oauthToken.RedirectURL); + } + requestParams.Add(Constants.GRANT_TYPE, Constants.GRANT_TYPE_AUTH_CODE); + requestParams.Add(Constants.CODE, oauthToken.GrantToken); + ParseResponse(oauthToken, GetResponseFromServer(requestParams, url)); + } + catch (System.Exception ex) when (!(ex is SDKException)) + { + throw new SDKException(Constants.ACCESS_TOKEN_ERROR, ex); + } + return oauthToken; + } + + private bool RevokeRefreshToken(string refreshToken, string url) + { + Dictionary requestParams = new Dictionary + { + { Constants.TOKEN, refreshToken } + }; + try + { + string response = GetResponseFromServer(requestParams, url); + JObject responseJSON = new JObject(response); + if (responseJSON != null && responseJSON.ContainsKey(Constants.STATUS) && responseJSON.GetValue(Constants.STATUS).Equals(Constants.SUCCESS)) + { + return true; + } + return false; + } + catch (System.Exception ex) when (!(ex is SDKException)) + { + throw new SDKException(Constants.REVOKE_TOKEN_ERROR, ex); + } + } + + private void ParseResponse(OAuthToken oauthToken, string response) + { + try + { + JObject responseJSON = JObject.Parse(response); + if (!responseJSON.ContainsKey(Constants.ACCESS_TOKEN)) + { + throw new SDKException(Constants.INVALID_TOKEN_ERROR, (responseJSON.ContainsKey(Constants.ERROR_KEY))? responseJSON[Constants.ERROR_KEY].ToString() : Constants.NO_ACCESS_TOKEN_ERROR); + } + oauthToken.AccessToken = responseJSON[Constants.ACCESS_TOKEN].ToString(); + oauthToken.ExpiresIn = GetTokenExpiresIn(responseJSON).ToString(); + if (responseJSON.ContainsKey(Constants.REFRESH_TOKEN)) + { + oauthToken.RefreshToken = responseJSON[Constants.REFRESH_TOKEN].ToString(); + } + if (responseJSON.ContainsKey(Constants.API_DOMAIN)) + { + oauthToken.APIDomain = responseJSON[Constants.API_DOMAIN].ToString(); + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.PARSE_RESPONSE + " : " + response, ex); + } + } + + private long GetTokenExpiresIn(JObject response) + { + long expiresInTime = response.ContainsKey(Constants.EXPIRES_IN_SEC) ? Convert.ToInt64(response[Constants.EXPIRES_IN]) : Convert.ToInt64(response[Constants.EXPIRES_IN]) * 1000; + return DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + expiresInTime - 600000; + } + + public long GetExpiryLapseInMillis(string ExpiryTime) + { + long time = Convert.ToInt64(ExpiryTime) - (long)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds; + return time; + } + + /// + /// The method to remove the current token from the Store. + /// + public void Remove() + { + try + { + if (Initializer.GetInitializer() == null) + { + throw new SDKException(Constants.SDK_UNINITIALIZATION_ERROR, Constants.SDK_UNINITIALIZATION_MESSAGE); + } + Initializer.GetInitializer().Store.DeleteToken(this.Id); + } + catch (System.Exception ex) when (!(ex is SDKException)) + { + throw ex; + } + } + + public bool Revoke(string id) + { + try + { + if (Initializer.GetInitializer() == null) + { + throw new SDKException(Constants.SDK_UNINITIALIZATION_ERROR, Constants.SDK_UNINITIALIZATION_MESSAGE); + } + + Initializer initializer = Initializer.GetInitializer(); + ITokenStore store = initializer.Store; + string url = initializer.Environment.GetAccountsUrl(); + bool isRevoke = false; + OAuthToken oauthToken = new OAuthToken(); + oauthToken.Id = id; + store.FindToken(oauthToken); + if (oauthToken != null && oauthToken.RefreshToken != null) + { + isRevoke = this.RevokeRefreshToken(oauthToken.RefreshToken, url + Constants.REVOKE_URL); + SDKLogger.LogInfo(new StringBuilder().Append(Constants.ID).Append(" : ").Append(id).Append(Constants.REFRESH_TOKEN_REMOVED).ToString()); + } + else + { + SDKLogger.LogWarning(new StringBuilder().Append(Constants.ID).Append(" : ").Append(id).Append(Constants.TOKEN_NOT_FOUND).ToString()); + } + return isRevoke; + } + catch (System.Exception ex) when (!(ex is SDKException)) + { + throw ex; + } + } + + public static T MergeObjects(T first, T second) + { + try + { + Type type = typeof(T); + T result = (T)Activator.CreateInstance(type); + foreach (PropertyInfo property in type.GetProperties()) + { + object value1 = property.GetValue(first); + object value2 = property.GetValue(second); + Object value = (value1 != null) ? value1 : value2; + property.SetValue(result, value); + } + return result; + } + catch (System.Exception ex) + { + throw new SDKException(Constants.MERGE_OBJECT, ex); + } + } + + public static bool AreAllObjectsNull(params Object[] objects) + { + foreach (Object o in objects) + { + if (o != null) + { + return false; + } + } + return true; + } + + public static FieldInfo GetPrivateFieldInfo(Type type, string fieldName) + { + BindingFlags Flags = BindingFlags.Instance + | BindingFlags.GetProperty + | BindingFlags.SetProperty + | BindingFlags.GetField + | BindingFlags.SetField + | BindingFlags.NonPublic + | BindingFlags.Public; + + FieldInfo[] fields = type.GetFields(Flags); + return fields.FirstOrDefault(fieldInfo => fieldInfo.Name == fieldName); + } + + public string GetId() + { + return this.Id; + } + + public class Builder + { + private string clientId; + private string clientSecret; + private string redirectURL; + private string refreshToken; + private string grantToken; + private string accessToken; + private string id; + private UserSignature userSignature; + private bool findUser = true; + + public Builder Id(string id) + { + this.id = id; + return this; + } + + public Builder ClientId(string clientId) + { + Utility.AssertNotNull(clientId, Constants.TOKEN_ERROR, Constants.CLIENT_ID_NULL_ERROR_MESSAGE); + this.clientId = clientId; + return this; + } + + public Builder ClientSecret(string clientSecret) + { + Utility.AssertNotNull(clientSecret, Constants.TOKEN_ERROR, Constants.CLIENT_SECRET_NULL_ERROR_MESSAGE); + this.clientSecret = clientSecret; + return this; + } + + public Builder RedirectURL(string redirectURL) + { + this.redirectURL = redirectURL; + return this; + } + + public Builder RefreshToken(string refreshToken) + { + this.refreshToken = refreshToken; + return this; + } + + public Builder GrantToken(string grantToken) + { + this.grantToken = grantToken; + return this; + } + + public Builder AccessToken(string accessToken) + { + this.accessToken = accessToken; + return this; + } + + public Builder UserSignature(UserSignature userSignature) + { + this.userSignature = userSignature; + return this; + } + + public Builder FindUser(bool findUser) + { + this.findUser = findUser; + return this; + } + + public OAuthToken Build() + { + if (AreAllObjectsNull(this.grantToken, this.refreshToken, this.id, this.accessToken, this.userSignature)) + { + throw new SDKException(Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + " - " + string.Join(", ", Constants.OAUTH_MANDATORY_KEYS)); + } + if (!AreAllObjectsNull(this.grantToken, this.refreshToken)) + { + if (AreAllObjectsNull(this.clientId, this.clientSecret)) + { + throw new SDKException(Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + " - " + string.Join(", ", Constants.OAUTH_MANDATORY_KEYS1)); + } + else + { + Utility.AssertNotNull(this.clientId, Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + " - " + Constants.CLIENT_ID); + Utility.AssertNotNull(this.clientSecret, Constants.MANDATORY_VALUE_ERROR, Constants.MANDATORY_KEY_ERROR + " - " + Constants.CLIENT_SECRET); + } + } + return new OAuthToken(this.clientId, this.clientSecret, this.grantToken, this.refreshToken, this.redirectURL, this.id, this.accessToken, this.userSignature, this.findUser); + } + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/DBStore.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/DBStore.cs new file mode 100644 index 0000000..3435909 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/DBStore.cs @@ -0,0 +1,488 @@ +using System.Collections.Generic; +using Com.Zoho.API.Exception; +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; +using MySql.Data.MySqlClient; +using System.Text; +using System; +using Com.Zoho.API.Authenticator; +using System.Xml.Linq; +using System.Management.Instrumentation; +using Newtonsoft.Json.Linq; + +namespace Com.Zoho.API.Authenticator.Store +{ + /// + /// This class stores the user token details to the MySQL DataBase. + /// + public class DBStore : ITokenStore + { + private string userName; + private string portNumber; + private string password; + private string host; + private string databaseName; + private string connectionString; + private string tableName; + + /// + /// Creates an DBStore class instance with the specified parameters. + /// + /// A string containing the DataBase host name. Default value localhost. + /// A String containing the DataBase name. Default value zohooauth. + /// A String containing the Table name. Default value oauthtoken. + /// A string containing the DataBase user name. Default value root. + /// A string containing the DataBase password. Default value "". + /// A string containing the DataBase port number. Default value 3306. + private DBStore(string host, string databaseName, string tableName, string userName, string password, string portNumber) + { + this.host = host; + this.databaseName = databaseName; + this.tableName = tableName; + this.userName = userName; + this.password = password; + this.portNumber = portNumber; + this.connectionString = $"{Constants.SERVER}={this.host};{Constants.USERNAME}={this.userName};{Constants.PASSWORD}={this.password};{Constants.DATABASE}={this.databaseName};{Constants.PORT}={this.portNumber};persistsecurityinfo=True;SslMode=none;"; + } + + public IToken FindToken(IToken token) + { + try + { + OAuthToken oauthToken = (OAuthToken)token; + StringBuilder query = new StringBuilder().Append("select * from ").Append(this.tableName); + if (oauthToken.UserSignature != null) + { + string name = oauthToken.UserSignature.Name; + if (name != null && name.Length > 0) + { + query.Append(" where user_name='").Append(name).Append("'"); + } + } + else if (oauthToken.AccessToken != null && AreAllObjectsNull(oauthToken.ClientId, oauthToken.ClientSecret)) + { + query.Append(" where access_token='").Append(oauthToken.AccessToken).Append("'"); + } + else if ((oauthToken.RefreshToken != null || oauthToken.GrantToken != null) && oauthToken.ClientId != null && oauthToken.ClientSecret != null) + { + if (oauthToken.GrantToken != null && oauthToken.GrantToken.Length > 0) + { + query.Append(" where grant_token='").Append(oauthToken.GrantToken).Append("'"); + } + else if (oauthToken.RefreshToken != null && oauthToken.RefreshToken.Length > 0) + { + query.Append(" where refresh_token='").Append(oauthToken.RefreshToken).Append("'"); + } + } + query.Append(" limit 1"); + using (MySqlConnection connection = new MySqlConnection(this.connectionString)) + { + connection.Open(); + using (MySqlCommand statement = new MySqlCommand(query.ToString(), connection)) + { + using (MySqlDataReader result = statement.ExecuteReader()) + { + while (result.Read()) + { + SetMergeData(oauthToken, result); + return oauthToken; + } + } + } + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_DB_ERROR, ex); + } + return null; + } + + public void SaveToken(IToken token) + { + if (token is not OAuthToken) + { + return; + } + try + { + using (MySqlConnection connection = new MySqlConnection(this.connectionString)) + { + connection.Open(); + OAuthToken oauthToken = (OAuthToken)token; + StringBuilder query = new StringBuilder().Append("update ").Append(this.tableName).Append(" set "); + if (oauthToken.UserSignature != null) + { + string name = oauthToken.UserSignature.Name; + if (name != null && name.Length > 0) + { + query.Append(SetToken(oauthToken)).Append(" where user_name='").Append(name).Append("'"); + } + } + else if (oauthToken.AccessToken != null && oauthToken.AccessToken.Length > 0 && AreAllObjectsNull(oauthToken.ClientId, oauthToken.ClientSecret)) + { + query.Append(SetToken(oauthToken)).Append(" where access_token='").Append(oauthToken.AccessToken).Append("'"); + } + else if (((oauthToken.RefreshToken != null && oauthToken.RefreshToken.Length > 0) || (oauthToken.GrantToken != null && oauthToken.GrantToken.Length > 0)) && oauthToken.ClientId != null && oauthToken.ClientSecret != null) + { + if (oauthToken.GrantToken != null && oauthToken.GrantToken.Length > 0) + { + query.Append(SetToken(oauthToken)).Append(" where grant_token='").Append(oauthToken.GrantToken).Append("'"); + } + else if (oauthToken.RefreshToken != null && oauthToken.RefreshToken.Length > 0) + { + query.Append(SetToken(oauthToken)).Append(" where refresh_token='").Append(oauthToken.RefreshToken).Append("'"); + } + } + query.Append(" limit 1"); + int rowsAffected = 0; + using (MySqlCommand command = new MySqlCommand(query.ToString(), connection)) + { + rowsAffected = command.ExecuteNonQuery(); + } + if(rowsAffected == 0) + { + string createquery = "insert into " + this.tableName + "(id,user_name,client_id,client_secret,refresh_token,access_token,grant_token,expiry_time,redirect_url,api_domain) values (@id, @user_name, @client_id, @client_secret, @refresh_token, @access_token, @grant_token, @expiry_time, @redirect_url,@api_domain);"; + if (oauthToken.Id != null || oauthToken.UserSignature != null) + { + if (oauthToken.RefreshToken == null && oauthToken.GrantToken == null && oauthToken.AccessToken == null) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_DB_ERROR1); + } + } + if (oauthToken.Id == null) + { + string newId = GenerateId().ToString(); + oauthToken.Id = newId; + } + using (MySqlCommand statement = new MySqlCommand(createquery, connection)) + { + statement.Parameters.AddWithValue("@id", oauthToken.Id); + statement.Parameters.AddWithValue("@user_name", oauthToken.UserSignature != null ? oauthToken.UserSignature.Name : null); + statement.Parameters.AddWithValue("@client_id", oauthToken.ClientId); + statement.Parameters.AddWithValue("@client_secret", oauthToken.ClientSecret); + statement.Parameters.AddWithValue("@refresh_token", oauthToken.RefreshToken); + statement.Parameters.AddWithValue("@access_token", oauthToken.AccessToken); + statement.Parameters.AddWithValue("@grant_token", oauthToken.GrantToken); + statement.Parameters.AddWithValue("@expiry_time", oauthToken.ExpiresIn); + statement.Parameters.AddWithValue("@redirect_url", oauthToken.RedirectURL); + statement.Parameters.AddWithValue("@api_domain", oauthToken.APIDomain); + statement.ExecuteNonQuery(); + } + } + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.SAVE_TOKEN_DB_ERROR, ex); + } + } + + public void DeleteToken(string id) + { + try + { + using (MySqlConnection connection = new MySqlConnection(connectionString)) + { + connection.Open(); + string query = new StringBuilder().Append("delete from ").Append(this.tableName).Append(" where id='").Append(id).Append("';").ToString(); + using (MySqlCommand statement = new MySqlCommand(query, connection)) + { + statement.ExecuteNonQuery(); + } + } + } + catch (System.Exception ex) when (!(ex is SDKException)) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.DELETE_TOKEN_DB_ERROR, ex); + } + } + + public List GetTokens() + { + List tokens = new List(); + try + { + using (MySqlConnection connection = new MySqlConnection(this.connectionString)) + { + connection.Open(); + string query = "select * from " + this.tableName + ";"; + using (MySqlCommand statement = new MySqlCommand(query, connection)) + { + using (MySqlDataReader result = statement.ExecuteReader()) + { + while (result.Read()) + { + OAuthToken oauthToken = new OAuthToken(); + SetMergeData(oauthToken, result); + tokens.Add(oauthToken); + } + } + } + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKENS_DB_ERROR, ex); + } + return tokens; + } + + public void DeleteTokens() + { + try + { + using (MySqlConnection connection = new MySqlConnection(connectionString)) + { + connection.Open(); + string query = "delete from " + this.tableName + ";"; + using (MySqlCommand statement = new MySqlCommand(query, connection)) + { + statement.ExecuteNonQuery(); + } + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.DELETE_TOKENS_DB_ERROR, ex); + } + } + + public IToken FindTokenById(string id) + { + try + { + using (MySqlConnection connection = new MySqlConnection(this.connectionString)) + { + connection.Open(); + string query = "select * from " + this.tableName + " where id='" + id + "'"; + using (MySqlCommand statement = new MySqlCommand(query, connection)) + { + OAuthToken oauthToken = new OAuthToken(); + using (MySqlDataReader result = statement.ExecuteReader()) + { + if (!result.HasRows) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_DB_ERROR); + } + while (result.Read()) + { + SetMergeData(oauthToken, result); + return oauthToken; + } + } + } + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_DB_ERROR, ex); + } + return null; + } + + private void SetMergeData(OAuthToken oauthToken, MySqlDataReader result) + { + if (oauthToken.Id == null) + { + oauthToken.Id = result[Constants.ID].ToString(); + } + if (oauthToken.UserSignature == null) + { + string name = result[Constants.USER_NAME].ToString(); + if (name != null) + { + oauthToken.UserSignature = new UserSignature(name); + } + } + if (oauthToken.ClientId == null) + { + oauthToken.ClientId = result[Constants.CLIENT_ID].ToString(); + } + if (oauthToken.ClientSecret == null) + { + oauthToken.ClientSecret = result[Constants.CLIENT_SECRET].ToString(); + } + if (oauthToken.RefreshToken == null) + { + oauthToken.RefreshToken = result[Constants.REFRESH_TOKEN].ToString(); + } + if (oauthToken.AccessToken == null) + { + oauthToken.AccessToken = result[Constants.ACCESS_TOKEN].ToString(); + } + if (oauthToken.GrantToken == null) + { + oauthToken.GrantToken = result[Constants.GRANT_TOKEN].ToString(); + } + if (oauthToken.ExpiresIn == null) + { + string expiresIn = Convert.ToString(result[Constants.EXPIRY_TIME]); + if (expiresIn != null) + { + oauthToken.ExpiresIn = expiresIn; + } + } + if (oauthToken.RedirectURL == null) + { + oauthToken.RedirectURL = result[Constants.REDIRECT_URL].ToString(); + } + if (oauthToken.APIDomain == null) + { + oauthToken.APIDomain = result[Constants.API_DOMAIN].ToString(); + } + } + + private string SetToken(OAuthToken oauthToken) + { + List query = new List(); + if (oauthToken.UserSignature != null) + { + string name = oauthToken.UserSignature.Name; + if (name != null && name.Length > 0) + { + query.Add(SetTokenInfo(Constants.USER_NAME, name)); + } + } + if (oauthToken.ClientId != null) + { + query.Add(SetTokenInfo(Constants.CLIENT_ID, oauthToken.ClientId)); + } + if (oauthToken.ClientSecret != null) + { + query.Add(SetTokenInfo(Constants.CLIENT_SECRET, oauthToken.ClientSecret)); + } + if (oauthToken.RefreshToken != null) + { + query.Add(SetTokenInfo(Constants.REFRESH_TOKEN, oauthToken.RefreshToken)); + } + if (oauthToken.AccessToken != null) + { + query.Add(SetTokenInfo(Constants.ACCESS_TOKEN, oauthToken.AccessToken)); + } + if (oauthToken.GrantToken != null) + { + query.Add(SetTokenInfo(Constants.GRANT_TOKEN, oauthToken.GrantToken)); + } + if (oauthToken.ExpiresIn != null) + { + query.Add(SetTokenInfo(Constants.EXPIRY_TIME, oauthToken.ExpiresIn)); + } + if (oauthToken.RedirectURL != null) + { + query.Add(SetTokenInfo(Constants.REDIRECT_URL, oauthToken.RedirectURL)); + } + if (oauthToken.APIDomain != null) + { + query.Add(SetTokenInfo(Constants.API_DOMAIN, oauthToken.APIDomain)); + } + return string.Join(",", query); + } + + private string SetTokenInfo(string key, string value) + { + return new StringBuilder().Append(key).Append("='").Append(value).Append("'").ToString(); + } + + private int GenerateId() + { + int id = 0; + try + { + using (MySqlConnection connection = new MySqlConnection(this.connectionString)) + { + connection.Open(); + string query = "select coalesce(max(`id`), 0) as id from " + this.tableName + ";"; // No i18N + using (MySqlCommand statement = new MySqlCommand(query.ToString(), connection)) + { + using (MySqlDataReader result = statement.ExecuteReader()) + { + while (result.Read()) + { + int? max = Convert.ToInt32(result[Constants.ID]); + if (max != null) + { + return (int)(max + 1); + } + } + } + } + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GENERATE_TOKEN_ID_ERROR, ex); + } + return id; + } + + private string GetData(object value) + { + return value != null && !value.ToString().Equals(Constants.NULL_VALUE, System.StringComparison.OrdinalIgnoreCase) && !string.IsNullOrEmpty(value.ToString()) ? value.ToString() : null; + } + + public bool AreAllObjectsNull(params Object[] objects) + { + foreach (Object o in objects) + { + if (o != null) + { + return false; + } + } + return true; + } + + public class Builder + { + private string userName = Constants.MYSQL_USER_NAME; + private string portNumber = Constants.MYSQL_PORT_NUMBER; + private string password = ""; + private string host = Constants.MYSQL_HOST; + private string databaseName = Constants.MYSQL_DATABASE_NAME; + private string tableName = Constants.MYSQL_TABLE_NAME; + + public Builder UserName(string userName) + { + this.userName = userName; + return this; + } + + public Builder PortNumber(string portNumber) + { + this.portNumber = portNumber; + return this; + } + + public Builder Password(string password) + { + this.password = password; + return this; + } + + public Builder Host(string host) + { + this.host = host; + return this; + } + + public Builder DatabaseName(string databaseName) + { + this.databaseName = databaseName; + + return this; + } + + public Builder TableName(string tableName) + { + this.tableName = tableName; + return this; + } + + public DBStore Build() + { + return new DBStore(this.host, this.databaseName, this.tableName, this.userName, this.password, this.portNumber); + } + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/FileStore.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/FileStore.cs new file mode 100644 index 0000000..30b46b1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/FileStore.cs @@ -0,0 +1,421 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Com.Zoho.API.Exception; +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.API.Authenticator.Store +{ + /// + /// This class stores the user token details to the file. + /// + public class FileStore : ITokenStore + { + private string filePath; + private List headers = new List() { Constants.ID, Constants.USER_NAME, Constants.CLIENT_ID, Constants.CLIENT_SECRET, Constants.REFRESH_TOKEN, Constants.ACCESS_TOKEN, Constants.GRANT_TOKEN, Constants.EXPIRY_TIME, Constants.REDIRECT_URL, Constants.API_DOMAIN }; + + /// + /// Creates an FileStore class instance with the specified parameters. + /// + /// A String containing the absolute file path to store tokens. + public FileStore(string filePath) + { + this.filePath = filePath; + string[] lines = null; + if (File.Exists(this.filePath)) + { + lines = File.ReadAllLines(this.filePath); + } + if (lines == null || lines.Length < 1) + { + using (FileStream fileStream = new FileStream(this.filePath, FileMode.Append)) + { + using (StreamWriter writer = new StreamWriter(fileStream)) + { + writer.WriteLine(string.Join(",", headers)); + writer.Close(); + } + fileStream.Close(); + } + } + } + + public IToken FindToken(IToken token) + { + if (token is not OAuthToken) + { + return token; + } + try + { + string[] allContents = File.ReadAllLines(this.filePath); + if (allContents == null || allContents.Length < 1) + { + return null; + } + OAuthToken oauthToken = (OAuthToken)token; + bool isRowPresent = false; + foreach (string line in allContents) + { + string[] nextRecord = line.Split(','); + if(nextRecord.Length > 1) + { + isRowPresent = CheckCondition(oauthToken, nextRecord); + if (isRowPresent) + { + SetMergeData(oauthToken, nextRecord); + return oauthToken; + } + } + } + if (!isRowPresent) + { + return null; + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_FILE_ERROR, ex); + } + + return token; + } + + public void SaveToken(IToken token) + { + if (token is not OAuthToken) + { + return; + } + try + { + OAuthToken oauthToken = (OAuthToken)token; + bool isRowPresent = false; + string[] lines = File.ReadAllLines(this.filePath); + if (lines == null || lines.Length < 1) + { + return; + } + List allContents = lines.ToList(); + for (int index = 1; index < allContents.Count; index++) + { + string line = allContents[index]; + string[] nextRecord = line.Split(','); + if(nextRecord.Length > 1) + { + if (oauthToken.Id != null) + { + string id = GetData(nextRecord[0]); + if (id != null && oauthToken.Id != null && id.Equals(oauthToken.Id)) + { + isRowPresent = true; + } + } + else + { + isRowPresent = CheckCondition(oauthToken, nextRecord); + } + if (isRowPresent) + { + SetMergeData(oauthToken, nextRecord); + allContents[index] = string.Join(",", SetToken(oauthToken)); + break; + } + } + else + { + allContents.RemoveAt(index); + } + } + if (!isRowPresent) + { + if (oauthToken.Id != null || oauthToken.UserSignature != null) + { + if (oauthToken.RefreshToken == null && oauthToken.GrantToken == null && oauthToken.AccessToken == null) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_FILE_ERROR1); + } + } + if(oauthToken.Id == null) + { + string newId = GenerateId(allContents); + oauthToken.Id = newId; + } + allContents.Add(SetToken(oauthToken)); + } + File.WriteAllText(this.filePath, string.Empty); + using (StreamWriter writer = new StreamWriter(this.filePath)) + { + foreach (string item in allContents) + { + writer.WriteLine(item); + } + } + } + catch (System.Exception ex) when (ex is UnauthorizedAccessException || ex is DirectoryNotFoundException) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.SAVE_TOKEN_FILE_ERROR, ex); + } + } + + public void DeleteToken(string id) + { + try + { + string[] lines = File.ReadAllLines(this.filePath); + if (lines == null || lines.Length < 1) + { + return; + } + File.WriteAllText(this.filePath, string.Empty); + bool isRowPresent = false; + List allContents = lines.ToList(); + for (int index = 1; index < allContents.Count; index++) + { + string[] nextRecord = allContents[index].Split(','); + if (nextRecord.Length > 1) + { + string recordId = GetData(nextRecord[0]); + if (recordId != null && recordId.Equals(id)) + { + isRowPresent = true; + allContents.RemoveAt(index); + break; + } + } + } + using (StreamWriter writer = new StreamWriter(this.filePath)) + { + foreach (string item in allContents) + { + writer.WriteLine(item); + } + } + if (!isRowPresent) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.TOKEN_BY_ID_FILE_ERROR); + } + } + catch (System.Exception ex) when (!(ex is SDKException) && (ex is UnauthorizedAccessException || ex is DirectoryNotFoundException)) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.DELETE_TOKEN_FILE_ERROR, ex); + } + } + + public List GetTokens() + { + List tokens = new List(); + try + { + string[] allContents = File.ReadAllLines(this.filePath); + if (allContents == null || allContents.Length < 1) + { + return null; + } + for (int index = 1; index < allContents.Length; index++) + { + string line = allContents[index]; + string[] nextRecord = line.Split(','); + OAuthToken oauthToken = new OAuthToken(); + SetMergeData(oauthToken, nextRecord); + tokens.Add(oauthToken); + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKENS_FILE_ERROR, ex); + } + return tokens; + } + + public void DeleteTokens() + { + try + { + File.WriteAllText(this.filePath, string.Empty); + File.WriteAllText(this.filePath, string.Join(",", headers)); + } + catch (System.Exception ex) when (ex is UnauthorizedAccessException || ex is DirectoryNotFoundException) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.DELETE_TOKENS_FILE_ERROR, ex); + } + } + + public IToken FindTokenById(string id) + { + try + { + string[] allContents = File.ReadAllLines(this.filePath); + bool isRowPresent = false; + OAuthToken oauthToken = new OAuthToken(); + foreach (string line in allContents) + { + string[] nextRecord = line.Split(','); + if (nextRecord[0].Equals(id)) + { + isRowPresent = true; + SetMergeData(oauthToken, nextRecord); + return oauthToken; + } + } + if (!isRowPresent) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_BY_ID_FILE_ERROR); + } + } + catch (System.Exception ex) + { + throw new SDKException(Constants.TOKEN_STORE, Constants.GET_TOKEN_FILE_ERROR, ex); + } + + return null; + } + + private bool CheckCondition(OAuthToken oauthToken, string[] nextRecord) + { + bool isRowPresent = false; + if (oauthToken.UserSignature != null) + { + string name = oauthToken.UserSignature.Name; + string userName = GetData(nextRecord[1]); + if (name != null && name.Length > 0 && userName != null && userName.Length > 0 && name.Equals(userName)) + { + isRowPresent = true; + } + } + else if (oauthToken.AccessToken != null && AreAllObjectsNull(oauthToken.ClientId, oauthToken.ClientSecret)) + { + string accessToken = GetData(nextRecord[5]); + if (accessToken != null && accessToken.Length > 0 && oauthToken.AccessToken.Length > 0 && oauthToken.AccessToken.Equals(accessToken)) + { + isRowPresent = true; + } + } + else if ((oauthToken.RefreshToken != null || oauthToken.GrantToken != null) && oauthToken.ClientId != null && oauthToken.ClientSecret != null) + { + string grantToken = GetData(nextRecord[6]); + string refreshToken = GetData(nextRecord[4]); + if (grantToken != null && grantToken.Length > 0 && oauthToken.GrantToken != null && oauthToken.GrantToken.Length > 0 && oauthToken.GrantToken.Equals(grantToken)) + { + isRowPresent = true; + } + else if (refreshToken != null && refreshToken.Length > 0 && oauthToken.RefreshToken!= null && oauthToken.RefreshToken.Length > 0 && oauthToken.RefreshToken.Equals(refreshToken)) + { + isRowPresent = true; + } + } + return isRowPresent; + } + + private string GetData(string value) + { + return (value != null && !String.IsNullOrEmpty(value) && value.Length > 0) ? value : null; + } + + private void SetMergeData(OAuthToken oauthToken, string[] nextRecord) + { + if (oauthToken.Id == null) + { + oauthToken.Id = GetData(nextRecord[0]); + } + if (oauthToken.UserSignature == null) + { + string name = GetData(nextRecord[1]); + if (name != null) + { + oauthToken.UserSignature = new UserSignature(name); + } + } + if (oauthToken.ClientId == null) + { + oauthToken.ClientId = GetData(nextRecord[2]); + } + if (oauthToken.ClientSecret == null) + { + oauthToken.ClientSecret = GetData(nextRecord[3]); + } + if (oauthToken.RefreshToken == null) + { + oauthToken.RefreshToken = GetData(nextRecord[4]); + } + if (oauthToken.AccessToken == null) + { + oauthToken.AccessToken = GetData(nextRecord[5]); + } + if (oauthToken.GrantToken == null) + { + oauthToken.GrantToken = GetData(nextRecord[6]); + } + if (oauthToken.ExpiresIn == null) + { + string expiresIn = GetData(nextRecord[7]); + if (expiresIn != null) + { + oauthToken.ExpiresIn = expiresIn.ToString(); + } + } + if (oauthToken.RedirectURL == null) + { + oauthToken.RedirectURL = GetData(nextRecord[8]); + } + if (oauthToken.APIDomain == null) + { + oauthToken.APIDomain = GetData(nextRecord[9]); + } + } + + private string SetToken(OAuthToken oauthToken) + { + List data = new List + { + oauthToken.Id, + oauthToken.UserSignature != null ? oauthToken.UserSignature.Name : null, + oauthToken.ClientId, + oauthToken.ClientSecret, + oauthToken.RefreshToken, + oauthToken.AccessToken, + oauthToken.GrantToken, + oauthToken.ExpiresIn, + oauthToken.RedirectURL, + oauthToken.APIDomain + }; + return string.Join(",", data); + } + + private string GenerateId(List allContents) + { + int maxValue = 0; + + if (allContents.Count > 1) + { + for (int index = 1; index < allContents.Count; index++) + { + string[] nextRecord = allContents[index].Split(','); + if (nextRecord.Length > 1 && nextRecord[0] != null && nextRecord[0].Length > 0) + { + if (maxValue < int.Parse(nextRecord[0])) + { + maxValue = int.Parse(nextRecord[0]); + } + } + } + } + return (maxValue + 1).ToString(); + } + + public bool AreAllObjectsNull(params Object[] objects) + { + foreach (Object o in objects) + { + if (o != null) + { + return false; + } + } + return true; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/ITokenStore.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/ITokenStore.cs new file mode 100644 index 0000000..7222e94 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Authenticator/Store/ITokenStore.cs @@ -0,0 +1,26 @@ + +using System; +using System.Collections.Generic; + +using Com.Zoho.Crm.API; + +namespace Com.Zoho.API.Authenticator.Store +{ + /// + /// This interface stores the user token details. + /// + public interface ITokenStore + { + public IToken FindToken(IToken token); + + public IToken FindTokenById(string id); + + public void SaveToken(IToken token); + + public void DeleteToken(string id); + + public List GetTokens(); + + public void DeleteTokens(); + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/API/Logger/Logger.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Logger/Logger.cs new file mode 100644 index 0000000..e9ee322 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Logger/Logger.cs @@ -0,0 +1,83 @@ +using System.Diagnostics; + +namespace Com.Zoho.Crm.API.Logger +{ + /// + /// This class represents the Logger level and log file path. + /// + public class Logger + { + public class Builder + { + private Levels level; + private string filePath; + public Builder Level(Levels level) + { + this.level = level; + return this; + } + + public Builder FilePath(string filePath) + { + this.filePath = filePath; + return this; + } + + public Logger Build() + { + return new Logger(this.level, this.filePath); + } + } + + private int level; + private string filePath; + + /// + /// Creates an Logger class instance with the specified log level and file path. + /// + /// A enum containing the log level. + /// A String containing the log file path. + /// + private Logger(Levels level, string filePath) + { + this.level = (int)level; + this.filePath = filePath; + } + + /// + /// This is a getter method to get logger level. + /// + /// A String representing the logger level. + public int Level + { + get + { + return level; + } + } + + /// + /// This is a getter method to get log file path. + /// + /// A String representing the Absolute file path, where messages need to be logged. + public string FilePath + { + get + { + return filePath; + } + } + + /// + /// This enum used to give logger levels. + /// + public enum Levels + { + ALL = TraceLevel.Verbose, + INFO = TraceLevel.Info, + WARNING = TraceLevel.Warning, + ERROR = TraceLevel.Error, + OFF = TraceLevel.Off + } + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/API/Logger/SDKLogger.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Logger/SDKLogger.cs new file mode 100644 index 0000000..c8ddeed --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/API/Logger/SDKLogger.cs @@ -0,0 +1,99 @@ +using System; +using System.Diagnostics; +using System.Text; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Logger +{ + /// + /// This class to initialize the SDK logger. + /// + public class SDKLogger + { + private static SDKLogger logger; + private static TraceSwitch logSwitch; + private static TextWriterTraceListener defaultTrace; + + public SDKLogger() + { + } + + /// + /// Creates an User SDKLogger instance with the specified Logger class instance. + /// + /// A Logger class instance. + internal static void Initialize(Logger logger) + { + Trace.AutoFlush = true; + SDKLogger.logger = new SDKLogger(); + logSwitch = new TraceSwitch(Constants.LOGGER, Constants.LOGGER_NAME); + logSwitch.Level = (TraceLevel)logger.Level; + if (!TraceLevel.Off.Equals((TraceLevel)logger.Level) && logger.FilePath != null && logger.FilePath != "") + { + defaultTrace = new TextWriterTraceListener(logger.FilePath); + Trace.Listeners.Add(defaultTrace); + } + } + + public static void LogInfo(string message) + { + if (logSwitch.TraceInfo) + { + logger.Log(message, Constants.LOG_INFO); + } + } + + private void Log(string message, string messageHeader) + { + string timestamp = GetTimeStamp(); + if (Trace.Listeners.Count > 1 && defaultTrace != null) + { + defaultTrace.WriteLine(message, timestamp + " [" + messageHeader + "]"); + defaultTrace.Flush(); + } + else + { + Trace.WriteLine(message, timestamp + " [" + messageHeader + "]"); + } + } + + public static void LogError(string message) + { + if (logSwitch.TraceError) + { + logger.Log(message, Constants.LOG_ERROR); + } + } + + public static void LogWarning(string message) + { + if (logSwitch.TraceWarning) + { + logger.Log(message, Constants.LOG_WARNING); + } + } + + internal static void LogError(System.Exception exception) + { + StackTrace stackTrace = new StackTrace(exception, true); + int frameCount = stackTrace.FrameCount; + StringBuilder errorMessage = new StringBuilder(); + for (int i = 0; i < frameCount; i++) + { + StackFrame frame = stackTrace.GetFrame(i); + errorMessage.AppendLine("Exception in Type: " + frame.GetMethod().DeclaringType.Name + " at Method: " + frame.GetMethod() + " in File: " + frame.GetFileName() + " at Line: " + frame.GetFileLineNumber()); + } + errorMessage.AppendLine(exception.Message); + if (exception.InnerException != null) + { + errorMessage.AppendLine(exception.InnerException.Message); + } + LogError(errorMessage.ToString()); + } + + private static string GetTimeStamp() + { + return DateTime.Now.ToString("yy-MM-dd HH:mm:ss"); + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/APIException.cs new file mode 100644 index 0000000..6811915 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.APIs +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/APIsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/APIsOperations.cs new file mode 100644 index 0000000..bb3d502 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/APIsOperations.cs @@ -0,0 +1,50 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.APIs +{ + + public class APIsOperations + { + private string filters; + + /// /// Creates an instance of ApisOperations with the given parameters + /// string + + public APIsOperations(string filters) + { + this.filters=filters; + + + } + + /// The method to get supported api + /// Instance of APIResponse + public APIResponse GetSupportedAPI() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/__apis"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("filters", "com.zoho.crm.api.Apis.GetSupportedAPIParam"), this.filters); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetSupportedAPIParam + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/OperationTypes.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/OperationTypes.cs new file mode 100644 index 0000000..270838b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/OperationTypes.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.APIs +{ + + public class OperationTypes : Model + { + private string method; + private string oauthScope; + private int? maxCredits; + private int? minCredits; + private Dictionary keyModified=new Dictionary(); + + public string Method + { + /// The method to get the method + /// string representing the method + get + { + return this.method; + + } + /// The method to set the value to method + /// string + set + { + this.method=value; + + this.keyModified["method"] = 1; + + } + } + + public string OauthScope + { + /// The method to get the oauthScope + /// string representing the oauthScope + get + { + return this.oauthScope; + + } + /// The method to set the value to oauthScope + /// string + set + { + this.oauthScope=value; + + this.keyModified["oauth_scope"] = 1; + + } + } + + public int? MaxCredits + { + /// The method to get the maxCredits + /// int? representing the maxCredits + get + { + return this.maxCredits; + + } + /// The method to set the value to maxCredits + /// int? + set + { + this.maxCredits=value; + + this.keyModified["max_credits"] = 1; + + } + } + + public int? MinCredits + { + /// The method to get the minCredits + /// int? representing the minCredits + get + { + return this.minCredits; + + } + /// The method to set the value to minCredits + /// int? + set + { + this.minCredits=value; + + this.keyModified["min_credits"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/ResponseHandler.cs new file mode 100644 index 0000000..faa16c7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.APIs +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/ResponseWrapper.cs new file mode 100644 index 0000000..c653848 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.APIs +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List apis; + private Dictionary keyModified=new Dictionary(); + + public List Apis + { + /// The method to get the apis + /// Instance of List + get + { + return this.apis; + + } + /// The method to set the value to apis + /// Instance of List + set + { + this.apis=value; + + this.keyModified["__apis"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/SupportedAPI.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/SupportedAPI.cs new file mode 100644 index 0000000..1cc1257 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/APIs/SupportedAPI.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.APIs +{ + + public class SupportedAPI : Model + { + private string path; + private List operationTypes; + private Dictionary keyModified=new Dictionary(); + + public string Path + { + /// The method to get the path + /// string representing the path + get + { + return this.path; + + } + /// The method to set the value to path + /// string + set + { + this.path=value; + + this.keyModified["path"] = 1; + + } + } + + public List OperationTypes + { + /// The method to get the operationTypes + /// Instance of List + get + { + return this.operationTypes; + + } + /// The method to set the value to operationTypes + /// Instance of List + set + { + this.operationTypes=value; + + this.keyModified["operation_types"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/APIException.cs new file mode 100644 index 0000000..c469a7b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class APIException : Model, ResponseHandler, ActionHandler, ActionResponse + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionHandler.cs new file mode 100644 index 0000000..44eadd9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionResponse.cs new file mode 100644 index 0000000..a5d21d6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionWrapper.cs new file mode 100644 index 0000000..531e963 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class ActionWrapper : Model, ActionHandler + { + private ActionResponse appointmentPreferences; + private Dictionary keyModified=new Dictionary(); + + public ActionResponse AppointmentPreferences + { + /// The method to get the appointmentPreferences + /// Instance of ActionResponse + get + { + return this.appointmentPreferences; + + } + /// The method to set the value to appointmentPreferences + /// Instance of ActionResponse + set + { + this.appointmentPreferences=value; + + this.keyModified["appointment_preferences"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/AppointmentPreference.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/AppointmentPreference.cs new file mode 100644 index 0000000..8ec60e2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/AppointmentPreference.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class AppointmentPreference : Model + { + private bool? showJobSheet; + private string whenDurationExceeds; + private Choice whenAppointmentCompleted; + private bool? allowBookingOutsideServiceAvailability; + private bool? allowBookingOutsideBusinesshours; + private DealRecordConfiguration dealRecordConfiguration; + private Dictionary keyModified=new Dictionary(); + + public bool? ShowJobSheet + { + /// The method to get the showJobSheet + /// bool? representing the showJobSheet + get + { + return this.showJobSheet; + + } + /// The method to set the value to showJobSheet + /// bool? + set + { + this.showJobSheet=value; + + this.keyModified["show_job_sheet"] = 1; + + } + } + + public string WhenDurationExceeds + { + /// The method to get the whenDurationExceeds + /// string representing the whenDurationExceeds + get + { + return this.whenDurationExceeds; + + } + /// The method to set the value to whenDurationExceeds + /// string + set + { + this.whenDurationExceeds=value; + + this.keyModified["when_duration_exceeds"] = 1; + + } + } + + public Choice WhenAppointmentCompleted + { + /// The method to get the whenAppointmentCompleted + /// Instance of Choice + get + { + return this.whenAppointmentCompleted; + + } + /// The method to set the value to whenAppointmentCompleted + /// Instance of Choice + set + { + this.whenAppointmentCompleted=value; + + this.keyModified["when_appointment_completed"] = 1; + + } + } + + public bool? AllowBookingOutsideServiceAvailability + { + /// The method to get the allowBookingOutsideServiceAvailability + /// bool? representing the allowBookingOutsideServiceAvailability + get + { + return this.allowBookingOutsideServiceAvailability; + + } + /// The method to set the value to allowBookingOutsideServiceAvailability + /// bool? + set + { + this.allowBookingOutsideServiceAvailability=value; + + this.keyModified["allow_booking_outside_service_availability"] = 1; + + } + } + + public bool? AllowBookingOutsideBusinesshours + { + /// The method to get the allowBookingOutsideBusinesshours + /// bool? representing the allowBookingOutsideBusinesshours + get + { + return this.allowBookingOutsideBusinesshours; + + } + /// The method to set the value to allowBookingOutsideBusinesshours + /// bool? + set + { + this.allowBookingOutsideBusinesshours=value; + + this.keyModified["allow_booking_outside_businesshours"] = 1; + + } + } + + public DealRecordConfiguration DealRecordConfiguration + { + /// The method to get the dealRecordConfiguration + /// Instance of DealRecordConfiguration + get + { + return this.dealRecordConfiguration; + + } + /// The method to set the value to dealRecordConfiguration + /// Instance of DealRecordConfiguration + set + { + this.dealRecordConfiguration=value; + + this.keyModified["deal_record_configuration"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/AppointmentPreferenceOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/AppointmentPreferenceOperations.cs new file mode 100644 index 0000000..eba49e5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/AppointmentPreferenceOperations.cs @@ -0,0 +1,68 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class AppointmentPreferenceOperations + { + /// The method to get appointment preference + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetAppointmentPreference(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/appointment_preferences"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update appointment preference + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateAppointmentPreference(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/appointment_preferences"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetAppointmentPreferenceParam + { + public static readonly Param INCLUDE=new Param("include", "com.zoho.crm.api.AppointmentPreference.GetAppointmentPreferenceParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/BodyWrapper.cs new file mode 100644 index 0000000..65dab42 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class BodyWrapper : Model + { + private AppointmentPreference appointmentPreferences; + private Dictionary keyModified=new Dictionary(); + + public AppointmentPreference AppointmentPreferences + { + /// The method to get the appointmentPreferences + /// Instance of AppointmentPreference + get + { + return this.appointmentPreferences; + + } + /// The method to set the value to appointmentPreferences + /// Instance of AppointmentPreference + set + { + this.appointmentPreferences=value; + + this.keyModified["appointment_preferences"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/DealRecordConfiguration.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/DealRecordConfiguration.cs new file mode 100644 index 0000000..78424de --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/DealRecordConfiguration.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class DealRecordConfiguration : Model + { + private Layout layout; + private List fieldMappings; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public Layout Layout + { + /// The method to get the layout + /// Instance of Layout + get + { + return this.layout; + + } + /// The method to set the value to layout + /// Instance of Layout + set + { + this.layout=value; + + this.keyModified["layout"] = 1; + + } + } + + public List FieldMappings + { + /// The method to get the fieldMappings + /// Instance of List + get + { + return this.fieldMappings; + + } + /// The method to set the value to fieldMappings + /// Instance of List + set + { + this.fieldMappings=value; + + this.keyModified["field_mappings"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/Field.cs new file mode 100644 index 0000000..8cd16b9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/Field.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class Field : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/FieldMappings.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/FieldMappings.cs new file mode 100644 index 0000000..876ddc2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/FieldMappings.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class FieldMappings : Model + { + private Choice type; + private string value; + private Field field; + private Dictionary keyModified=new Dictionary(); + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/Layout.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/Layout.cs new file mode 100644 index 0000000..a6c9a77 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/Layout.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class Layout : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ResponseHandler.cs new file mode 100644 index 0000000..3adcf9f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ResponseWrapper.cs new file mode 100644 index 0000000..e513aaf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private AppointmentPreference appointmentPreferences; + private Dictionary keyModified=new Dictionary(); + + public AppointmentPreference AppointmentPreferences + { + /// The method to get the appointmentPreferences + /// Instance of AppointmentPreference + get + { + return this.appointmentPreferences; + + } + /// The method to set the value to appointmentPreferences + /// Instance of AppointmentPreference + set + { + this.appointmentPreferences=value; + + this.keyModified["appointment_preferences"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/SuccessResponse.cs new file mode 100644 index 0000000..2bd4ed1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AppointmentPreference/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AppointmentPreference +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/APIException.cs new file mode 100644 index 0000000..60de560 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class APIException : Model, ActionResponse, ResponseHandler + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ActionResponse.cs new file mode 100644 index 0000000..a1c1ea5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ActionWrapper.cs new file mode 100644 index 0000000..d9a48fc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class ActionWrapper : Model + { + private List assignmentRules; + private Dictionary keyModified=new Dictionary(); + + public List AssignmentRules + { + /// The method to get the assignmentRules + /// Instance of List + get + { + return this.assignmentRules; + + } + /// The method to set the value to assignmentRules + /// Instance of List + set + { + this.assignmentRules=value; + + this.keyModified["assignment_rules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/AssignmentRules.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/AssignmentRules.cs new file mode 100644 index 0000000..fa17c8f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/AssignmentRules.cs @@ -0,0 +1,250 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class AssignmentRules : Model + { + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private DefaultAssignee defaultAssignee; + private string apiName; + private User modifiedBy; + private User createdBy; + private long? id; + private string name; + private Modules.MinifiedModule module; + private string description; + private Dictionary keyModified=new Dictionary(); + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public DefaultAssignee DefaultAssignee + { + /// The method to get the defaultAssignee + /// Instance of DefaultAssignee + get + { + return this.defaultAssignee; + + } + /// The method to set the value to defaultAssignee + /// Instance of DefaultAssignee + set + { + this.defaultAssignee=value; + + this.keyModified["default_assignee"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public User ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of User + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of User + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public User CreatedBy + { + /// The method to get the createdBy + /// Instance of User + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of User + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public Modules.MinifiedModule Module + { + /// The method to get the module + /// Instance of MinifiedModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of MinifiedModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public string Description + { + /// The method to get the description + /// string representing the description + get + { + return this.description; + + } + /// The method to set the value to description + /// string + set + { + this.description=value; + + this.keyModified["description"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/AssignmentRulesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/AssignmentRulesOperations.cs new file mode 100644 index 0000000..479e8df --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/AssignmentRulesOperations.cs @@ -0,0 +1,73 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class AssignmentRulesOperations + { + /// The method to get assignment rules + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetAssignmentRules(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/automation/assignment_rules"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get assignment rule + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetAssignmentRule(long? id, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/automation/assignment_rules/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetAssignmentRulesParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.AssignmentRules.GetAssignmentRulesParam"); + } + + + public static class GetAssignmentRuleParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.AssignmentRules.GetAssignmentRuleParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/DefaultAssignee.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/DefaultAssignee.cs new file mode 100644 index 0000000..0101e92 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/DefaultAssignee.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class DefaultAssignee : Model + { + private string name; + private string id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ResponseHandler.cs new file mode 100644 index 0000000..721cd0e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ResponseWrapper.cs new file mode 100644 index 0000000..7eff8e3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List assignmentRules; + private Dictionary keyModified=new Dictionary(); + + public List AssignmentRules + { + /// The method to get the assignmentRules + /// Instance of List + get + { + return this.assignmentRules; + + } + /// The method to set the value to assignmentRules + /// Instance of List + set + { + this.assignmentRules=value; + + this.keyModified["assignment_rules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/SuccessResponse.cs new file mode 100644 index 0000000..2cd3925 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/User.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/User.cs new file mode 100644 index 0000000..6f376c1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssignmentRules/User.cs @@ -0,0 +1,123 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssignmentRules +{ + + public class User : Users.MinifiedUser , Model + { + private int? zuid; + private string name; + private long? id; + private string email; + private Dictionary keyModified=new Dictionary(); + + public int? Zuid + { + /// The method to get the zuid + /// int? representing the zuid + get + { + return this.zuid; + + } + /// The method to set the value to zuid + /// int? + set + { + this.zuid=value; + + this.keyModified["zuid"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/APIException.cs new file mode 100644 index 0000000..02e0587 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class APIException : Model, ActionResponse, ActionHandler + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionHandler.cs new file mode 100644 index 0000000..25e9afb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionResponse.cs new file mode 100644 index 0000000..cafe333 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionWrapper.cs new file mode 100644 index 0000000..2885388 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class ActionWrapper : Model, ActionHandler + { + private List emails; + private Dictionary keyModified=new Dictionary(); + + public List Emails + { + /// The method to get the emails + /// Instance of List + get + { + return this.emails; + + } + /// The method to set the value to emails + /// Instance of List + set + { + this.emails=value; + + this.keyModified["Emails"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/AssociateEmail.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/AssociateEmail.cs new file mode 100644 index 0000000..6b606b0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/AssociateEmail.cs @@ -0,0 +1,291 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class AssociateEmail : Model + { + private From from; + private List to; + private List cc; + private List bcc; + private List attachments; + private string content; + private Choice mailFormat; + private string subject; + private string originalMessageId; + private bool? sent; + private DateTimeOffset? dateTime; + private LinkedRecord linkedRecord; + private Dictionary keyModified=new Dictionary(); + + public From From + { + /// The method to get the from + /// Instance of From + get + { + return this.from; + + } + /// The method to set the value to from + /// Instance of From + set + { + this.from=value; + + this.keyModified["from"] = 1; + + } + } + + public List To + { + /// The method to get the to + /// Instance of List + get + { + return this.to; + + } + /// The method to set the value to to + /// Instance of List + set + { + this.to=value; + + this.keyModified["to"] = 1; + + } + } + + public List Cc + { + /// The method to get the cc + /// Instance of List + get + { + return this.cc; + + } + /// The method to set the value to cc + /// Instance of List + set + { + this.cc=value; + + this.keyModified["cc"] = 1; + + } + } + + public List Bcc + { + /// The method to get the bcc + /// Instance of List + get + { + return this.bcc; + + } + /// The method to set the value to bcc + /// Instance of List + set + { + this.bcc=value; + + this.keyModified["bcc"] = 1; + + } + } + + public List Attachments + { + /// The method to get the attachments + /// Instance of List + get + { + return this.attachments; + + } + /// The method to set the value to attachments + /// Instance of List + set + { + this.attachments=value; + + this.keyModified["attachments"] = 1; + + } + } + + public string Content + { + /// The method to get the content + /// string representing the content + get + { + return this.content; + + } + /// The method to set the value to content + /// string + set + { + this.content=value; + + this.keyModified["content"] = 1; + + } + } + + public Choice MailFormat + { + /// The method to get the mailFormat + /// Instance of Choice + get + { + return this.mailFormat; + + } + /// The method to set the value to mailFormat + /// Instance of Choice + set + { + this.mailFormat=value; + + this.keyModified["mail_format"] = 1; + + } + } + + public string Subject + { + /// The method to get the subject + /// string representing the subject + get + { + return this.subject; + + } + /// The method to set the value to subject + /// string + set + { + this.subject=value; + + this.keyModified["subject"] = 1; + + } + } + + public string OriginalMessageId + { + /// The method to get the originalMessageId + /// string representing the originalMessageId + get + { + return this.originalMessageId; + + } + /// The method to set the value to originalMessageId + /// string + set + { + this.originalMessageId=value; + + this.keyModified["original_message_id"] = 1; + + } + } + + public bool? Sent + { + /// The method to get the sent + /// bool? representing the sent + get + { + return this.sent; + + } + /// The method to set the value to sent + /// bool? + set + { + this.sent=value; + + this.keyModified["sent"] = 1; + + } + } + + public DateTimeOffset? DateTime + { + /// The method to get the dateTime + /// DateTimeOffset? representing the dateTime + get + { + return this.dateTime; + + } + /// The method to set the value to dateTime + /// DateTimeOffset? + set + { + this.dateTime=value; + + this.keyModified["date_time"] = 1; + + } + } + + public LinkedRecord LinkedRecord + { + /// The method to get the linkedRecord + /// Instance of LinkedRecord + get + { + return this.linkedRecord; + + } + /// The method to set the value to linkedRecord + /// Instance of LinkedRecord + set + { + this.linkedRecord=value; + + this.keyModified["linked_record"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/AssociateEmailOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/AssociateEmailOperations.cs new file mode 100644 index 0000000..af574f0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/AssociateEmailOperations.cs @@ -0,0 +1,48 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class AssociateEmailOperations + { + /// The method to associate + /// long? + /// string + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse Associate(long? recordid, string module, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordid.ToString()); + + apiPath=string.Concat(apiPath, "/actions/associate_email"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Attachments.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Attachments.cs new file mode 100644 index 0000000..47eea4a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Attachments.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class Attachments : Model + { + private string id; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Available.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Available.cs new file mode 100644 index 0000000..e161af9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Available.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class Available : Model + { + private bool? available; + private Record record; + private LinkedRecord linkedRecord; + private Dictionary keyModified=new Dictionary(); + + public bool? Available_1 + { + /// The method to get the available + /// bool? representing the available + get + { + return this.available; + + } + /// The method to set the value to available + /// bool? + set + { + this.available=value; + + this.keyModified["available"] = 1; + + } + } + + public Record Record + { + /// The method to get the record + /// Instance of Record + get + { + return this.record; + + } + /// The method to set the value to record + /// Instance of Record + set + { + this.record=value; + + this.keyModified["record"] = 1; + + } + } + + public LinkedRecord LinkedRecord + { + /// The method to get the linkedRecord + /// Instance of LinkedRecord + get + { + return this.linkedRecord; + + } + /// The method to set the value to linkedRecord + /// Instance of LinkedRecord + set + { + this.linkedRecord=value; + + this.keyModified["linked_record"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/BodyWrapper.cs new file mode 100644 index 0000000..a150ef5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class BodyWrapper : Model + { + private List emails; + private Dictionary keyModified=new Dictionary(); + + public List Emails + { + /// The method to get the emails + /// Instance of List + get + { + return this.emails; + + } + /// The method to set the value to emails + /// Instance of List + set + { + this.emails=value; + + this.keyModified["Emails"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/From.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/From.cs new file mode 100644 index 0000000..16c56d3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/From.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class From : Model + { + private string userName; + private string email; + private Dictionary keyModified=new Dictionary(); + + public string UserName + { + /// The method to get the userName + /// string representing the userName + get + { + return this.userName; + + } + /// The method to set the value to userName + /// string + set + { + this.userName=value; + + this.keyModified["user_name"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/LinkedRecord.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/LinkedRecord.cs new file mode 100644 index 0000000..e5f164d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/LinkedRecord.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class LinkedRecord : Model + { + private ModuleMap module; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public ModuleMap Module + { + /// The method to get the module + /// Instance of ModuleMap + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of ModuleMap + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ModuleMap.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ModuleMap.cs new file mode 100644 index 0000000..5dfefd6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/ModuleMap.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class ModuleMap : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Record.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Record.cs new file mode 100644 index 0000000..bb5e3c5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/Record.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class Record : Model + { + private ModuleMap module; + private long? id; + private LinkedRecord linkedRecord; + private Dictionary keyModified=new Dictionary(); + + public ModuleMap Module + { + /// The method to get the module + /// Instance of ModuleMap + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of ModuleMap + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public LinkedRecord LinkedRecord + { + /// The method to get the linkedRecord + /// Instance of LinkedRecord + get + { + return this.linkedRecord; + + } + /// The method to set the value to linkedRecord + /// Instance of LinkedRecord + set + { + this.linkedRecord=value; + + this.keyModified["linked_record"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/SuccessResponse.cs new file mode 100644 index 0000000..1ebfac3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/To.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/To.cs new file mode 100644 index 0000000..8b09134 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AssociateEmail/To.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AssociateEmail +{ + + public class To : Model + { + private string userName; + private string email; + private Dictionary keyModified=new Dictionary(); + + public string UserName + { + /// The method to get the userName + /// string representing the userName + get + { + return this.userName; + + } + /// The method to set the value to userName + /// string + set + { + this.userName=value; + + this.keyModified["user_name"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/APIException.cs new file mode 100644 index 0000000..5009ea8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class APIException : Model, ActionHandler, ResponseHandler + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionHandler.cs new file mode 100644 index 0000000..4ec63a4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Attachments +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionResponse.cs new file mode 100644 index 0000000..7e32f08 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Attachments +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionWrapper.cs new file mode 100644 index 0000000..9988469 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Attachment.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Attachment.cs new file mode 100644 index 0000000..76d38a4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Attachment.cs @@ -0,0 +1,397 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class Attachment : Model + { + private Users.MinifiedUser owner; + private Users.MinifiedUser modifiedBy; + private Users.MinifiedUser createdBy; + private ParentId parentId; + private string sharingPermission; + private int? attachmentType; + private long? id; + private DateTimeOffset? modifiedTime; + private DateTimeOffset? createdTime; + private string fileName; + private string size; + private bool? editable; + private string fileId; + private string type; + private string seModule; + private string state; + private string linkUrl; + private Dictionary keyModified=new Dictionary(); + + public Users.MinifiedUser Owner + { + /// The method to get the owner + /// Instance of MinifiedUser + get + { + return this.owner; + + } + /// The method to set the value to owner + /// Instance of MinifiedUser + set + { + this.owner=value; + + this.keyModified["Owner"] = 1; + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.modifiedBy=value; + + this.keyModified["Modified_By"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["Created_By"] = 1; + + } + } + + public ParentId ParentId + { + /// The method to get the parentId + /// Instance of ParentId + get + { + return this.parentId; + + } + /// The method to set the value to parentId + /// Instance of ParentId + set + { + this.parentId=value; + + this.keyModified["Parent_Id"] = 1; + + } + } + + public string SharingPermission + { + /// The method to get the sharingPermission + /// string representing the sharingPermission + get + { + return this.sharingPermission; + + } + /// The method to set the value to sharingPermission + /// string + set + { + this.sharingPermission=value; + + this.keyModified["$sharing_permission"] = 1; + + } + } + + public int? AttachmentType + { + /// The method to get the attachmentType + /// int? representing the attachmentType + get + { + return this.attachmentType; + + } + /// The method to set the value to attachmentType + /// int? + set + { + this.attachmentType=value; + + this.keyModified["$attachment_type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["Modified_Time"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["Created_Time"] = 1; + + } + } + + public string FileName + { + /// The method to get the fileName + /// string representing the fileName + get + { + return this.fileName; + + } + /// The method to set the value to fileName + /// string + set + { + this.fileName=value; + + this.keyModified["File_Name"] = 1; + + } + } + + public string Size + { + /// The method to get the size + /// string representing the size + get + { + return this.size; + + } + /// The method to set the value to size + /// string + set + { + this.size=value; + + this.keyModified["Size"] = 1; + + } + } + + public bool? Editable + { + /// The method to get the editable + /// bool? representing the editable + get + { + return this.editable; + + } + /// The method to set the value to editable + /// bool? + set + { + this.editable=value; + + this.keyModified["$editable"] = 1; + + } + } + + public string FileId + { + /// The method to get the fileId + /// string representing the fileId + get + { + return this.fileId; + + } + /// The method to set the value to fileId + /// string + set + { + this.fileId=value; + + this.keyModified["$file_id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["$type"] = 1; + + } + } + + public string SeModule + { + /// The method to get the seModule + /// string representing the seModule + get + { + return this.seModule; + + } + /// The method to set the value to seModule + /// string + set + { + this.seModule=value; + + this.keyModified["$se_module"] = 1; + + } + } + + public string State + { + /// The method to get the state + /// string representing the state + get + { + return this.state; + + } + /// The method to set the value to state + /// string + set + { + this.state=value; + + this.keyModified["$state"] = 1; + + } + } + + public string LinkUrl + { + /// The method to get the linkUrl + /// string representing the linkUrl + get + { + return this.linkUrl; + + } + /// The method to set the value to linkUrl + /// string + set + { + this.linkUrl=value; + + this.keyModified["$link_url"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/AttachmentsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/AttachmentsOperations.cs new file mode 100644 index 0000000..259c52a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/AttachmentsOperations.cs @@ -0,0 +1,240 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class AttachmentsOperations + { + /// The method to upload attachments + /// long? + /// string + /// Instance of FileBodyWrapper + /// Instance of APIResponse + public APIResponse UploadAttachments(long? recordId, string module, FileBodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Attachments"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="multipart/form-data"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get attachments + /// long? + /// string + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetAttachments(long? recordId, string module, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Attachments"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to upload url attachments + /// long? + /// string + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse UploadUrlAttachments(long? recordId, string module, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Attachments"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete attachments + /// long? + /// string + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse DeleteAttachments(long? recordId, string module, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Attachments"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get attachment + /// long? + /// long? + /// string + /// Instance of APIResponse + public APIResponse GetAttachment(long? id, long? recordId, string module) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Attachments/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "image/png"); + + + } + + /// The method to delete attachment + /// long? + /// long? + /// string + /// Instance of APIResponse + public APIResponse DeleteAttachment(long? id, long? recordId, string module) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Attachments/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetAttachmentsParam + { + public static readonly Param FIELDS=new Param("fields", "com.zoho.crm.api.Attachments.GetAttachmentsParam"); + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.Attachments.GetAttachmentsParam"); + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.Attachments.GetAttachmentsParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.Attachments.GetAttachmentsParam"); + } + + + public static class UploadUrlAttachmentsParam + { + public static readonly Param ATTACHMENTURL=new Param("attachmentUrl", "com.zoho.crm.api.Attachments.UploadUrlAttachmentsParam"); + public static readonly Param TITLE=new Param("title", "com.zoho.crm.api.Attachments.UploadUrlAttachmentsParam"); + } + + + public static class DeleteAttachmentsParam + { + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.Attachments.DeleteAttachmentsParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/FileBodyWrapper.cs new file mode 100644 index 0000000..79337d4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Info.cs new file mode 100644 index 0000000..664989e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class Info : Model + { + private int? perPage; + private int? page; + private int? count; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Owner.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Owner.cs new file mode 100644 index 0000000..c799742 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/Owner.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class Owner : Model + { + private long? id; + private string name; + private string email; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ParentId.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ParentId.cs new file mode 100644 index 0000000..d0b0294 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ParentId.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class ParentId : Model + { + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ResponseHandler.cs new file mode 100644 index 0000000..bd34ee9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Attachments +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ResponseWrapper.cs new file mode 100644 index 0000000..c94df55 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/SuccessResponse.cs new file mode 100644 index 0000000..39fd05e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Attachments/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Attachments +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/APIException.cs new file mode 100644 index 0000000..891237e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class APIException : ActionResponse, Model, ActionHandler, ResponseHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionHandler.cs new file mode 100644 index 0000000..46331da --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionResponse.cs new file mode 100644 index 0000000..49d39b6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionWrapper.cs new file mode 100644 index 0000000..b6b5e4d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class ActionWrapper : Model, ActionHandler + { + private List auditLogExport; + private Dictionary keyModified=new Dictionary(); + + public List AuditLogExport + { + /// The method to get the auditLogExport + /// Instance of List + get + { + return this.auditLogExport; + + } + /// The method to set the value to auditLogExport + /// Instance of List + set + { + this.auditLogExport=value; + + this.keyModified["audit_log_export"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/AuditLogExport.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/AuditLogExport.cs new file mode 100644 index 0000000..721d7b8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/AuditLogExport.cs @@ -0,0 +1,207 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class AuditLogExport : Model + { + private Criteria criteria; + private long? id; + private string status; + private User createdBy; + private List downloadLinks; + private DateTimeOffset? jobStartTime; + private DateTimeOffset? jobEndTime; + private DateTimeOffset? expiryDate; + private Dictionary keyModified=new Dictionary(); + + public Criteria Criteria + { + /// The method to get the criteria + /// Instance of Criteria + get + { + return this.criteria; + + } + /// The method to set the value to criteria + /// Instance of Criteria + set + { + this.criteria=value; + + this.keyModified["criteria"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public User CreatedBy + { + /// The method to get the createdBy + /// Instance of User + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of User + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public List DownloadLinks + { + /// The method to get the downloadLinks + /// Instance of List + get + { + return this.downloadLinks; + + } + /// The method to set the value to downloadLinks + /// Instance of List + set + { + this.downloadLinks=value; + + this.keyModified["download_links"] = 1; + + } + } + + public DateTimeOffset? JobStartTime + { + /// The method to get the jobStartTime + /// DateTimeOffset? representing the jobStartTime + get + { + return this.jobStartTime; + + } + /// The method to set the value to jobStartTime + /// DateTimeOffset? + set + { + this.jobStartTime=value; + + this.keyModified["job_start_time"] = 1; + + } + } + + public DateTimeOffset? JobEndTime + { + /// The method to get the jobEndTime + /// DateTimeOffset? representing the jobEndTime + get + { + return this.jobEndTime; + + } + /// The method to set the value to jobEndTime + /// DateTimeOffset? + set + { + this.jobEndTime=value; + + this.keyModified["job_end_time"] = 1; + + } + } + + public DateTimeOffset? ExpiryDate + { + /// The method to get the expiryDate + /// DateTimeOffset? representing the expiryDate + get + { + return this.expiryDate; + + } + /// The method to set the value to expiryDate + /// DateTimeOffset? + set + { + this.expiryDate=value; + + this.keyModified["expiry_date"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/AuditLogExportOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/AuditLogExportOperations.cs new file mode 100644 index 0000000..cb40eeb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/AuditLogExportOperations.cs @@ -0,0 +1,83 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class AuditLogExportOperations + { + /// The method to create auditlog export + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateAuditlogExport(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/audit_log_export"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get exported auditlogs + /// Instance of APIResponse + public APIResponse GetExportedAuditlogs() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/audit_log_export"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get exported auditlog + /// long? + /// Instance of APIResponse + public APIResponse GetExportedAuditlog(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/audit_log_export/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/BodyWrapper.cs new file mode 100644 index 0000000..c340a9c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class BodyWrapper : Model + { + private List auditLogExport; + private Dictionary keyModified=new Dictionary(); + + public List AuditLogExport + { + /// The method to get the auditLogExport + /// Instance of List + get + { + return this.auditLogExport; + + } + /// The method to set the value to auditLogExport + /// Instance of List + set + { + this.auditLogExport=value; + + this.keyModified["audit_log_export"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Criteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Criteria.cs new file mode 100644 index 0000000..e7188eb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Criteria.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class Criteria : Model + { + private Field field; + private string comparator; + private object value; + private string groupOperator; + private List group; + private Dictionary keyModified=new Dictionary(); + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public string Comparator + { + /// The method to get the comparator + /// string representing the comparator + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// string + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + public string GroupOperator + { + /// The method to get the groupOperator + /// string representing the groupOperator + get + { + return this.groupOperator; + + } + /// The method to set the value to groupOperator + /// string + set + { + this.groupOperator=value; + + this.keyModified["group_operator"] = 1; + + } + } + + public List Group + { + /// The method to get the group + /// Instance of List + get + { + return this.group; + + } + /// The method to set the value to group + /// Instance of List + set + { + this.group=value; + + this.keyModified["group"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Field.cs new file mode 100644 index 0000000..114f5f2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Field.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class Field : Model + { + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Module.cs new file mode 100644 index 0000000..da3a586 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class Module : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ResponseHandler.cs new file mode 100644 index 0000000..e37a224 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ResponseWrapper.cs new file mode 100644 index 0000000..ad0c678 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List auditLogExport; + private Dictionary keyModified=new Dictionary(); + + public List AuditLogExport + { + /// The method to get the auditLogExport + /// Instance of List + get + { + return this.auditLogExport; + + } + /// The method to set the value to auditLogExport + /// Instance of List + set + { + this.auditLogExport=value; + + this.keyModified["audit_log_export"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/SuccessResponse.cs new file mode 100644 index 0000000..cbb5ad2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/User.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/User.cs new file mode 100644 index 0000000..b2aeccf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AuditLogExport/User.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AuditLogExport +{ + + public class User : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/APIException.cs new file mode 100644 index 0000000..2b44f1a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AvailableCurrencies +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/AvailableCurrenciesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/AvailableCurrenciesOperations.cs new file mode 100644 index 0000000..d3efb5f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/AvailableCurrenciesOperations.cs @@ -0,0 +1,31 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.AvailableCurrencies +{ + + public class AvailableCurrenciesOperations + { + /// The method to get available currencies + /// Instance of APIResponse + public APIResponse GetAvailableCurrencies() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies/actions/available_currencies"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/Currency.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/Currency.cs new file mode 100644 index 0000000..cd9e07d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/Currency.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AvailableCurrencies +{ + + public class Currency : Model + { + private string displayValue; + private string decimalSeparator; + private string symbol; + private string thousandSeparator; + private string displayName; + private string isoCode; + private string decimalPlaces; + private Dictionary keyModified=new Dictionary(); + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public string DecimalSeparator + { + /// The method to get the decimalSeparator + /// string representing the decimalSeparator + get + { + return this.decimalSeparator; + + } + /// The method to set the value to decimalSeparator + /// string + set + { + this.decimalSeparator=value; + + this.keyModified["decimal_separator"] = 1; + + } + } + + public string Symbol + { + /// The method to get the symbol + /// string representing the symbol + get + { + return this.symbol; + + } + /// The method to set the value to symbol + /// string + set + { + this.symbol=value; + + this.keyModified["symbol"] = 1; + + } + } + + public string ThousandSeparator + { + /// The method to get the thousandSeparator + /// string representing the thousandSeparator + get + { + return this.thousandSeparator; + + } + /// The method to set the value to thousandSeparator + /// string + set + { + this.thousandSeparator=value; + + this.keyModified["thousand_separator"] = 1; + + } + } + + public string DisplayName + { + /// The method to get the displayName + /// string representing the displayName + get + { + return this.displayName; + + } + /// The method to set the value to displayName + /// string + set + { + this.displayName=value; + + this.keyModified["display_name"] = 1; + + } + } + + public string IsoCode + { + /// The method to get the isoCode + /// string representing the isoCode + get + { + return this.isoCode; + + } + /// The method to set the value to isoCode + /// string + set + { + this.isoCode=value; + + this.keyModified["iso_code"] = 1; + + } + } + + public string DecimalPlaces + { + /// The method to get the decimalPlaces + /// string representing the decimalPlaces + get + { + return this.decimalPlaces; + + } + /// The method to set the value to decimalPlaces + /// string + set + { + this.decimalPlaces=value; + + this.keyModified["decimal_places"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/ResponseHandler.cs new file mode 100644 index 0000000..bb2a4d4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.AvailableCurrencies +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/ResponseWrapper.cs new file mode 100644 index 0000000..e2046f7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/AvailableCurrencies/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.AvailableCurrencies +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List availableCurrencies; + private Dictionary keyModified=new Dictionary(); + + public List AvailableCurrencies + { + /// The method to get the availableCurrencies + /// Instance of List + get + { + return this.availableCurrencies; + + } + /// The method to set the value to availableCurrencies + /// Instance of List + set + { + this.availableCurrencies=value; + + this.keyModified["available_currencies"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/APIException.cs new file mode 100644 index 0000000..c6f78ab --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class APIException : Model, ActionResponse, ActionHandler, ResponseHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionHandler.cs new file mode 100644 index 0000000..f221012 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Backup +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionResponse.cs new file mode 100644 index 0000000..4e2af5b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Backup +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionWrapper.cs new file mode 100644 index 0000000..95b81c2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class ActionWrapper : Model, ActionHandler + { + private ActionResponse backup; + private Dictionary keyModified=new Dictionary(); + + public ActionResponse Backup + { + /// The method to get the backup + /// Instance of ActionResponse + get + { + return this.backup; + + } + /// The method to set the value to backup + /// Instance of ActionResponse + set + { + this.backup=value; + + this.keyModified["backup"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Backup.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Backup.cs new file mode 100644 index 0000000..cdeab15 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Backup.cs @@ -0,0 +1,165 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class Backup : Model + { + private string rrule; + private long? id; + private DateTimeOffset? startDate; + private DateTimeOffset? scheduledDate; + private string status; + private Requester requester; + private Dictionary keyModified=new Dictionary(); + + public string Rrule + { + /// The method to get the rrule + /// string representing the rrule + get + { + return this.rrule; + + } + /// The method to set the value to rrule + /// string + set + { + this.rrule=value; + + this.keyModified["rrule"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public DateTimeOffset? StartDate + { + /// The method to get the startDate + /// DateTimeOffset? representing the startDate + get + { + return this.startDate; + + } + /// The method to set the value to startDate + /// DateTimeOffset? + set + { + this.startDate=value; + + this.keyModified["start_date"] = 1; + + } + } + + public DateTimeOffset? ScheduledDate + { + /// The method to get the scheduledDate + /// DateTimeOffset? representing the scheduledDate + get + { + return this.scheduledDate; + + } + /// The method to set the value to scheduledDate + /// DateTimeOffset? + set + { + this.scheduledDate=value; + + this.keyModified["scheduled_date"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Requester Requester + { + /// The method to get the requester + /// Instance of Requester + get + { + return this.requester; + + } + /// The method to set the value to requester + /// Instance of Requester + set + { + this.requester=value; + + this.keyModified["requester"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/BackupOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/BackupOperations.cs new file mode 100644 index 0000000..5ca34ac --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/BackupOperations.cs @@ -0,0 +1,161 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class BackupOperations + { + /// The method to schedule + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse Schedule(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/backup"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get details + /// Instance of APIResponse + public APIResponse GetDetails() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/backup"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get urls + /// Instance of APIResponse + public APIResponse GetUrls() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/backup/urls"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to history + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse History(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/backup/history"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to cancel + /// long? + /// Instance of APIResponse + public APIResponse Cancel(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/backup/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/cancel"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to download backed up data + /// string + /// Instance of APIResponse + public APIResponse DownloadBackedUpData(string downloadUrl) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, downloadUrl.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/octet-stream"); + + + } + + + public static class HISTORYParam + { + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.Backup.HISTORYParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.Backup.HISTORYParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/BodyWrapper.cs new file mode 100644 index 0000000..4553cea --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class BodyWrapper : Model + { + private Backup backup; + private Dictionary keyModified=new Dictionary(); + + public Backup Backup + { + /// The method to get the backup + /// Instance of Backup + get + { + return this.backup; + + } + /// The method to set the value to backup + /// Instance of Backup + set + { + this.backup=value; + + this.keyModified["backup"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/FileBodyWrapper.cs new file mode 100644 index 0000000..ed42123 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/History.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/History.cs new file mode 100644 index 0000000..eb55f3c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/History.cs @@ -0,0 +1,207 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class History : Model + { + private long? id; + private DateTimeOffset? logTime; + private string action; + private string repeatType; + private int? count; + private string fileName; + private string state; + private Requester doneBy; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public DateTimeOffset? LogTime + { + /// The method to get the logTime + /// DateTimeOffset? representing the logTime + get + { + return this.logTime; + + } + /// The method to set the value to logTime + /// DateTimeOffset? + set + { + this.logTime=value; + + this.keyModified["log_time"] = 1; + + } + } + + public string Action + { + /// The method to get the action + /// string representing the action + get + { + return this.action; + + } + /// The method to set the value to action + /// string + set + { + this.action=value; + + this.keyModified[Constants.REQUEST_CATEGORY_ACTION] = 1; + + } + } + + public string RepeatType + { + /// The method to get the repeatType + /// string representing the repeatType + get + { + return this.repeatType; + + } + /// The method to set the value to repeatType + /// string + set + { + this.repeatType=value; + + this.keyModified["repeat_type"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public string FileName + { + /// The method to get the fileName + /// string representing the fileName + get + { + return this.fileName; + + } + /// The method to set the value to fileName + /// string + set + { + this.fileName=value; + + this.keyModified["file_name"] = 1; + + } + } + + public string State + { + /// The method to get the state + /// string representing the state + get + { + return this.state; + + } + /// The method to set the value to state + /// string + set + { + this.state=value; + + this.keyModified["state"] = 1; + + } + } + + public Requester DoneBy + { + /// The method to get the doneBy + /// Instance of Requester + get + { + return this.doneBy; + + } + /// The method to set the value to doneBy + /// Instance of Requester + set + { + this.doneBy=value; + + this.keyModified["done_by"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/HistoryWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/HistoryWrapper.cs new file mode 100644 index 0000000..07ae23e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/HistoryWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class HistoryWrapper : Model, ResponseHandler + { + private List history; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List History + { + /// The method to get the history + /// Instance of List + get + { + return this.history; + + } + /// The method to set the value to history + /// Instance of List + set + { + this.history=value; + + this.keyModified["history"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Info.cs new file mode 100644 index 0000000..8ec8e28 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class Info : Model + { + private int? perPage; + private int? count; + private int? page; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Requester.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Requester.cs new file mode 100644 index 0000000..fb62f9b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Requester.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class Requester : Model + { + private long? id; + private string name; + private string zuid; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Zuid + { + /// The method to get the zuid + /// string representing the zuid + get + { + return this.zuid; + + } + /// The method to set the value to zuid + /// string + set + { + this.zuid=value; + + this.keyModified["zuid"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ResponseHandler.cs new file mode 100644 index 0000000..58ab829 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Backup +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ResponseWrapper.cs new file mode 100644 index 0000000..08c4b03 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private Backup backup; + private Dictionary keyModified=new Dictionary(); + + public Backup Backup + { + /// The method to get the backup + /// Instance of Backup + get + { + return this.backup; + + } + /// The method to set the value to backup + /// Instance of Backup + set + { + this.backup=value; + + this.keyModified["backup"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/SuccessResponse.cs new file mode 100644 index 0000000..e7c2d9c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Urls.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Urls.cs new file mode 100644 index 0000000..3335c01 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/Urls.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class Urls : Model + { + private List dataLinks; + private List attachmentLinks; + private DateTimeOffset? expiryDate; + private Dictionary keyModified=new Dictionary(); + + public List DataLinks + { + /// The method to get the dataLinks + /// Instance of List + get + { + return this.dataLinks; + + } + /// The method to set the value to dataLinks + /// Instance of List + set + { + this.dataLinks=value; + + this.keyModified["data_links"] = 1; + + } + } + + public List AttachmentLinks + { + /// The method to get the attachmentLinks + /// Instance of List + get + { + return this.attachmentLinks; + + } + /// The method to set the value to attachmentLinks + /// Instance of List + set + { + this.attachmentLinks=value; + + this.keyModified["attachment_links"] = 1; + + } + } + + public DateTimeOffset? ExpiryDate + { + /// The method to get the expiryDate + /// DateTimeOffset? representing the expiryDate + get + { + return this.expiryDate; + + } + /// The method to set the value to expiryDate + /// DateTimeOffset? + set + { + this.expiryDate=value; + + this.keyModified["expiry_date"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/UrlsWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/UrlsWrapper.cs new file mode 100644 index 0000000..d8b001b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Backup/UrlsWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Backup +{ + + public class UrlsWrapper : Model, ResponseHandler + { + private Urls urls; + private Dictionary keyModified=new Dictionary(); + + public Urls Urls + { + /// The method to get the urls + /// Instance of Urls + get + { + return this.urls; + + } + /// The method to set the value to urls + /// Instance of Urls + set + { + this.urls=value; + + this.keyModified["urls"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/APIException.cs new file mode 100644 index 0000000..7c59d80 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class APIException : Model, ResponseHandler, ActionHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ActionHandler.cs new file mode 100644 index 0000000..649dc65 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Blueprint +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/AssociationDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/AssociationDetails.cs new file mode 100644 index 0000000..13ec127 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/AssociationDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class AssociationDetails : Model + { + private LookupField lookupField; + private LookupField relatedField; + private Dictionary keyModified=new Dictionary(); + + public LookupField LookupField + { + /// The method to get the lookupField + /// Instance of LookupField + get + { + return this.lookupField; + + } + /// The method to set the value to lookupField + /// Instance of LookupField + set + { + this.lookupField=value; + + this.keyModified["lookup_field"] = 1; + + } + } + + public LookupField RelatedField + { + /// The method to get the relatedField + /// Instance of LookupField + get + { + return this.relatedField; + + } + /// The method to set the value to relatedField + /// Instance of LookupField + set + { + this.relatedField=value; + + this.keyModified["related_field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/AutoNumber.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/AutoNumber.cs new file mode 100644 index 0000000..b210963 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/AutoNumber.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class AutoNumber : Model + { + private string prefix; + private string suffix; + private int? startNumber; + private Dictionary keyModified=new Dictionary(); + + public string Prefix + { + /// The method to get the prefix + /// string representing the prefix + get + { + return this.prefix; + + } + /// The method to set the value to prefix + /// string + set + { + this.prefix=value; + + this.keyModified["prefix"] = 1; + + } + } + + public string Suffix + { + /// The method to get the suffix + /// string representing the suffix + get + { + return this.suffix; + + } + /// The method to set the value to suffix + /// string + set + { + this.suffix=value; + + this.keyModified["suffix"] = 1; + + } + } + + public int? StartNumber + { + /// The method to get the startNumber + /// int? representing the startNumber + get + { + return this.startNumber; + + } + /// The method to set the value to startNumber + /// int? + set + { + this.startNumber=value; + + this.keyModified["start_number"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BluePrint.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BluePrint.cs new file mode 100644 index 0000000..c1f4ef9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BluePrint.cs @@ -0,0 +1,123 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class BluePrint : Model + { + private string transitionId; + private Record.Record data; + private ProcessInfo processInfo; + private List transitions; + private Dictionary keyModified=new Dictionary(); + + public string TransitionId + { + /// The method to get the transitionId + /// string representing the transitionId + get + { + return this.transitionId; + + } + /// The method to set the value to transitionId + /// string + set + { + this.transitionId=value; + + this.keyModified["transition_id"] = 1; + + } + } + + public Record.Record Data + { + /// The method to get the data + /// Instance of Record + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of Record + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public ProcessInfo ProcessInfo + { + /// The method to get the processInfo + /// Instance of ProcessInfo + get + { + return this.processInfo; + + } + /// The method to set the value to processInfo + /// Instance of ProcessInfo + set + { + this.processInfo=value; + + this.keyModified["process_info"] = 1; + + } + } + + public List Transitions + { + /// The method to get the transitions + /// Instance of List + get + { + return this.transitions; + + } + /// The method to set the value to transitions + /// Instance of List + set + { + this.transitions=value; + + this.keyModified["transitions"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BlueprintOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BlueprintOperations.cs new file mode 100644 index 0000000..ae9421c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BlueprintOperations.cs @@ -0,0 +1,91 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class BlueprintOperations + { + private string moduleAPIName; + private string recordId; + + /// /// Creates an instance of BlueprintOperations with the given parameters + /// string + /// string + + public BlueprintOperations(string recordId, string moduleAPIName) + { + this.recordId=recordId; + + this.moduleAPIName=moduleAPIName; + + + } + + /// The method to get blueprint + /// Instance of APIResponse + public APIResponse GetBlueprint() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.moduleAPIName.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.recordId.ToString()); + + apiPath=string.Concat(apiPath, "/actions/blueprint"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update blueprint + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateBlueprint(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.moduleAPIName.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.recordId.ToString()); + + apiPath=string.Concat(apiPath, "/actions/blueprint"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BodyWrapper.cs new file mode 100644 index 0000000..951d903 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class BodyWrapper : Model + { + private List blueprint; + private Dictionary keyModified=new Dictionary(); + + public List Blueprint + { + /// The method to get the blueprint + /// Instance of List + get + { + return this.blueprint; + + } + /// The method to set the value to blueprint + /// Instance of List + set + { + this.blueprint=value; + + this.keyModified["blueprint"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Crypt.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Crypt.cs new file mode 100644 index 0000000..0e475cc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Crypt.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Crypt : Model + { + private string mode; + private string column; + private string table; + private int? status; + private Dictionary keyModified=new Dictionary(); + + public string Mode + { + /// The method to get the mode + /// string representing the mode + get + { + return this.mode; + + } + /// The method to set the value to mode + /// string + set + { + this.mode=value; + + this.keyModified["mode"] = 1; + + } + } + + public string Column + { + /// The method to get the column + /// string representing the column + get + { + return this.column; + + } + /// The method to set the value to column + /// string + set + { + this.column=value; + + this.keyModified["column"] = 1; + + } + } + + public string Table + { + /// The method to get the table + /// string representing the table + get + { + return this.table; + + } + /// The method to set the value to table + /// string + set + { + this.table=value; + + this.keyModified["table"] = 1; + + } + } + + public int? Status + { + /// The method to get the status + /// int? representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// int? + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Currency.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Currency.cs new file mode 100644 index 0000000..962a52b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Currency.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Currency : Model + { + private string roundingOption; + private int? precision; + private Dictionary keyModified=new Dictionary(); + + public string RoundingOption + { + /// The method to get the roundingOption + /// string representing the roundingOption + get + { + return this.roundingOption; + + } + /// The method to set the value to roundingOption + /// string + set + { + this.roundingOption=value; + + this.keyModified["rounding_option"] = 1; + + } + } + + public int? Precision + { + /// The method to get the precision + /// int? representing the precision + get + { + return this.precision; + + } + /// The method to set the value to precision + /// int? + set + { + this.precision=value; + + this.keyModified["precision"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/CurrentPicklist.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/CurrentPicklist.cs new file mode 100644 index 0000000..afe7277 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/CurrentPicklist.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class CurrentPicklist : Model + { + private string colourCode; + private string id; + private string value; + private Dictionary keyModified=new Dictionary(); + + public string ColourCode + { + /// The method to get the colourCode + /// string representing the colourCode + get + { + return this.colourCode; + + } + /// The method to set the value to colourCode + /// string + set + { + this.colourCode=value; + + this.keyModified["colour_code"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Escalation.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Escalation.cs new file mode 100644 index 0000000..12d8d6e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Escalation.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Escalation : Model + { + private int? days; + private string status; + private Dictionary keyModified=new Dictionary(); + + public int? Days + { + /// The method to get the days + /// int? representing the days + get + { + return this.days; + + } + /// The method to set the value to days + /// int? + set + { + this.days=value; + + this.keyModified["days"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Field.cs new file mode 100644 index 0000000..074130f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Field.cs @@ -0,0 +1,1005 @@ +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Field : Model + { + private Fields.External external; + private Choice displayType; + private bool? filterable; + private bool? pickListValuesSortedLexically; + private bool? sortable; + private int? uiType; + private Fields.Private private1; + private bool? systemMandatory; + private bool? webhook; + private string jsonType; + private Crypt crypt; + private string fieldLabel; + private ToolTip tooltip; + private string createdSource; + private Layout layouts; + private bool? fieldReadOnly; + private string content; + private string displayLabel; + private string validationRule; + private bool? readOnly; + private AssociationDetails associationDetails; + private Fields.MultiModuleLookup multiModuleLookup; + private Currency currency; + private string id; + private bool? customField; + private Module lookup; + private Dictionary convertMapping; + private bool? visible; + private int? length; + private string columnName; + private string type; + private ViewType viewType; + private int? transitionSequence; + private string apiName; + private Fields.Unique unique; + private bool? historyTracking; + private string dataType; + private Formula formula; + private string decimalPlace; + private MultiSelectLookup multiselectlookup; + private List pickListValues; + private AutoNumber autoNumber; + private string personalityName; + private bool? mandatory; + private long? quickSequenceNumber; + private List profiles; + private Dictionary keyModified=new Dictionary(); + + public Fields.External External + { + /// The method to get the external + /// Instance of External + get + { + return this.external; + + } + /// The method to set the value to external + /// Instance of External + set + { + this.external=value; + + this.keyModified["external"] = 1; + + } + } + + public Choice DisplayType + { + /// The method to get the displayType + /// Instance of Choice + get + { + return this.displayType; + + } + /// The method to set the value to displayType + /// Instance of Choice + set + { + this.displayType=value; + + this.keyModified["display_type"] = 1; + + } + } + + public bool? Filterable + { + /// The method to get the filterable + /// bool? representing the filterable + get + { + return this.filterable; + + } + /// The method to set the value to filterable + /// bool? + set + { + this.filterable=value; + + this.keyModified["filterable"] = 1; + + } + } + + public bool? PickListValuesSortedLexically + { + /// The method to get the pickListValuesSortedLexically + /// bool? representing the pickListValuesSortedLexically + get + { + return this.pickListValuesSortedLexically; + + } + /// The method to set the value to pickListValuesSortedLexically + /// bool? + set + { + this.pickListValuesSortedLexically=value; + + this.keyModified["pick_list_values_sorted_lexically"] = 1; + + } + } + + public bool? Sortable + { + /// The method to get the sortable + /// bool? representing the sortable + get + { + return this.sortable; + + } + /// The method to set the value to sortable + /// bool? + set + { + this.sortable=value; + + this.keyModified["sortable"] = 1; + + } + } + + public int? UiType + { + /// The method to get the uiType + /// int? representing the uiType + get + { + return this.uiType; + + } + /// The method to set the value to uiType + /// int? + set + { + this.uiType=value; + + this.keyModified["ui_type"] = 1; + + } + } + + public Fields.Private Private + { + /// The method to get the private + /// Instance of Private + get + { + return this.private1; + + } + /// The method to set the value to private + /// Instance of Private + set + { + this.private1=value; + + this.keyModified["private"] = 1; + + } + } + + public bool? SystemMandatory + { + /// The method to get the systemMandatory + /// bool? representing the systemMandatory + get + { + return this.systemMandatory; + + } + /// The method to set the value to systemMandatory + /// bool? + set + { + this.systemMandatory=value; + + this.keyModified["system_mandatory"] = 1; + + } + } + + public bool? Webhook + { + /// The method to get the webhook + /// bool? representing the webhook + get + { + return this.webhook; + + } + /// The method to set the value to webhook + /// bool? + set + { + this.webhook=value; + + this.keyModified["webhook"] = 1; + + } + } + + public string JsonType + { + /// The method to get the jsonType + /// string representing the jsonType + get + { + return this.jsonType; + + } + /// The method to set the value to jsonType + /// string + set + { + this.jsonType=value; + + this.keyModified["json_type"] = 1; + + } + } + + public Crypt Crypt + { + /// The method to get the crypt + /// Instance of Crypt + get + { + return this.crypt; + + } + /// The method to set the value to crypt + /// Instance of Crypt + set + { + this.crypt=value; + + this.keyModified["crypt"] = 1; + + } + } + + public string FieldLabel + { + /// The method to get the fieldLabel + /// string representing the fieldLabel + get + { + return this.fieldLabel; + + } + /// The method to set the value to fieldLabel + /// string + set + { + this.fieldLabel=value; + + this.keyModified["field_label"] = 1; + + } + } + + public ToolTip Tooltip + { + /// The method to get the tooltip + /// Instance of ToolTip + get + { + return this.tooltip; + + } + /// The method to set the value to tooltip + /// Instance of ToolTip + set + { + this.tooltip=value; + + this.keyModified["tooltip"] = 1; + + } + } + + public string CreatedSource + { + /// The method to get the createdSource + /// string representing the createdSource + get + { + return this.createdSource; + + } + /// The method to set the value to createdSource + /// string + set + { + this.createdSource=value; + + this.keyModified["created_source"] = 1; + + } + } + + public Layout Layouts + { + /// The method to get the layouts + /// Instance of Layout + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of Layout + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + public bool? FieldReadOnly + { + /// The method to get the fieldReadOnly + /// bool? representing the fieldReadOnly + get + { + return this.fieldReadOnly; + + } + /// The method to set the value to fieldReadOnly + /// bool? + set + { + this.fieldReadOnly=value; + + this.keyModified["field_read_only"] = 1; + + } + } + + public string Content + { + /// The method to get the content + /// string representing the content + get + { + return this.content; + + } + /// The method to set the value to content + /// string + set + { + this.content=value; + + this.keyModified["content"] = 1; + + } + } + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string ValidationRule + { + /// The method to get the validationRule + /// string representing the validationRule + get + { + return this.validationRule; + + } + /// The method to set the value to validationRule + /// string + set + { + this.validationRule=value; + + this.keyModified["validation_rule"] = 1; + + } + } + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public AssociationDetails AssociationDetails + { + /// The method to get the associationDetails + /// Instance of AssociationDetails + get + { + return this.associationDetails; + + } + /// The method to set the value to associationDetails + /// Instance of AssociationDetails + set + { + this.associationDetails=value; + + this.keyModified["association_details"] = 1; + + } + } + + public Fields.MultiModuleLookup MultiModuleLookup + { + /// The method to get the multiModuleLookup + /// Instance of MultiModuleLookup + get + { + return this.multiModuleLookup; + + } + /// The method to set the value to multiModuleLookup + /// Instance of MultiModuleLookup + set + { + this.multiModuleLookup=value; + + this.keyModified["multi_module_lookup"] = 1; + + } + } + + public Currency Currency + { + /// The method to get the currency + /// Instance of Currency + get + { + return this.currency; + + } + /// The method to set the value to currency + /// Instance of Currency + set + { + this.currency=value; + + this.keyModified["currency"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? CustomField + { + /// The method to get the customField + /// bool? representing the customField + get + { + return this.customField; + + } + /// The method to set the value to customField + /// bool? + set + { + this.customField=value; + + this.keyModified["custom_field"] = 1; + + } + } + + public Module Lookup + { + /// The method to get the lookup + /// Instance of Module + get + { + return this.lookup; + + } + /// The method to set the value to lookup + /// Instance of Module + set + { + this.lookup=value; + + this.keyModified["lookup"] = 1; + + } + } + + public Dictionary ConvertMapping + { + /// The method to get the convertMapping + /// Dictionary representing the convertMapping + get + { + return this.convertMapping; + + } + /// The method to set the value to convertMapping + /// Dictionary + set + { + this.convertMapping=value; + + this.keyModified["convert_mapping"] = 1; + + } + } + + public bool? Visible + { + /// The method to get the visible + /// bool? representing the visible + get + { + return this.visible; + + } + /// The method to set the value to visible + /// bool? + set + { + this.visible=value; + + this.keyModified["visible"] = 1; + + } + } + + public int? Length + { + /// The method to get the length + /// int? representing the length + get + { + return this.length; + + } + /// The method to set the value to length + /// int? + set + { + this.length=value; + + this.keyModified["length"] = 1; + + } + } + + public string ColumnName + { + /// The method to get the columnName + /// string representing the columnName + get + { + return this.columnName; + + } + /// The method to set the value to columnName + /// string + set + { + this.columnName=value; + + this.keyModified["column_name"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["_type"] = 1; + + } + } + + public ViewType ViewType + { + /// The method to get the viewType + /// Instance of ViewType + get + { + return this.viewType; + + } + /// The method to set the value to viewType + /// Instance of ViewType + set + { + this.viewType=value; + + this.keyModified["view_type"] = 1; + + } + } + + public int? TransitionSequence + { + /// The method to get the transitionSequence + /// int? representing the transitionSequence + get + { + return this.transitionSequence; + + } + /// The method to set the value to transitionSequence + /// int? + set + { + this.transitionSequence=value; + + this.keyModified["transition_sequence"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public Fields.Unique Unique + { + /// The method to get the unique + /// Instance of Unique + get + { + return this.unique; + + } + /// The method to set the value to unique + /// Instance of Unique + set + { + this.unique=value; + + this.keyModified["unique"] = 1; + + } + } + + public bool? HistoryTracking + { + /// The method to get the historyTracking + /// bool? representing the historyTracking + get + { + return this.historyTracking; + + } + /// The method to set the value to historyTracking + /// bool? + set + { + this.historyTracking=value; + + this.keyModified["history_tracking"] = 1; + + } + } + + public string DataType + { + /// The method to get the dataType + /// string representing the dataType + get + { + return this.dataType; + + } + /// The method to set the value to dataType + /// string + set + { + this.dataType=value; + + this.keyModified["data_type"] = 1; + + } + } + + public Formula Formula + { + /// The method to get the formula + /// Instance of Formula + get + { + return this.formula; + + } + /// The method to set the value to formula + /// Instance of Formula + set + { + this.formula=value; + + this.keyModified["formula"] = 1; + + } + } + + public string DecimalPlace + { + /// The method to get the decimalPlace + /// string representing the decimalPlace + get + { + return this.decimalPlace; + + } + /// The method to set the value to decimalPlace + /// string + set + { + this.decimalPlace=value; + + this.keyModified["decimal_place"] = 1; + + } + } + + public MultiSelectLookup Multiselectlookup + { + /// The method to get the multiselectlookup + /// Instance of MultiSelectLookup + get + { + return this.multiselectlookup; + + } + /// The method to set the value to multiselectlookup + /// Instance of MultiSelectLookup + set + { + this.multiselectlookup=value; + + this.keyModified["multiselectlookup"] = 1; + + } + } + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + public AutoNumber AutoNumber + { + /// The method to get the autoNumber + /// Instance of AutoNumber + get + { + return this.autoNumber; + + } + /// The method to set the value to autoNumber + /// Instance of AutoNumber + set + { + this.autoNumber=value; + + this.keyModified["auto_number"] = 1; + + } + } + + public string PersonalityName + { + /// The method to get the personalityName + /// string representing the personalityName + get + { + return this.personalityName; + + } + /// The method to set the value to personalityName + /// string + set + { + this.personalityName=value; + + this.keyModified["personality_name"] = 1; + + } + } + + public bool? Mandatory + { + /// The method to get the mandatory + /// bool? representing the mandatory + get + { + return this.mandatory; + + } + /// The method to set the value to mandatory + /// bool? + set + { + this.mandatory=value; + + this.keyModified["mandatory"] = 1; + + } + } + + public long? QuickSequenceNumber + { + /// The method to get the quickSequenceNumber + /// long? representing the quickSequenceNumber + get + { + return this.quickSequenceNumber; + + } + /// The method to set the value to quickSequenceNumber + /// long? + set + { + this.quickSequenceNumber=value; + + this.keyModified["quick_sequence_number"] = 1; + + } + } + + public List Profiles + { + /// The method to get the profiles + /// Instance of List + get + { + return this.profiles; + + } + /// The method to set the value to profiles + /// Instance of List + set + { + this.profiles=value; + + this.keyModified["profiles"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Formula.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Formula.cs new file mode 100644 index 0000000..1c93ca0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Formula.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Formula : Model + { + private string returnType; + private int? expression; + private Dictionary keyModified=new Dictionary(); + + public string ReturnType + { + /// The method to get the returnType + /// string representing the returnType + get + { + return this.returnType; + + } + /// The method to set the value to returnType + /// string + set + { + this.returnType=value; + + this.keyModified["return_type"] = 1; + + } + } + + public int? Expression + { + /// The method to get the expression + /// int? representing the expression + get + { + return this.expression; + + } + /// The method to set the value to expression + /// int? + set + { + this.expression=value; + + this.keyModified["expression"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Layout.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Layout.cs new file mode 100644 index 0000000..838224d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Layout.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Layout : Model + { + private string id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/LookupField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/LookupField.cs new file mode 100644 index 0000000..d247ace --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/LookupField.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class LookupField : Model + { + private string id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Module.cs new file mode 100644 index 0000000..e935728 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Module.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Module : Model + { + private string displayLabel; + private string apiName; + private string module; + private string id; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string Module_1 + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/MultiSelectLookup.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/MultiSelectLookup.cs new file mode 100644 index 0000000..b5c5817 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/MultiSelectLookup.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class MultiSelectLookup : Model + { + private string displayLabel; + private string linkingModule; + private string lookupApiname; + private string apiName; + private string connectedlookupApiname; + private string id; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string LinkingModule + { + /// The method to get the linkingModule + /// string representing the linkingModule + get + { + return this.linkingModule; + + } + /// The method to set the value to linkingModule + /// string + set + { + this.linkingModule=value; + + this.keyModified["linking_module"] = 1; + + } + } + + public string LookupApiname + { + /// The method to get the lookupApiname + /// string representing the lookupApiname + get + { + return this.lookupApiname; + + } + /// The method to set the value to lookupApiname + /// string + set + { + this.lookupApiname=value; + + this.keyModified["lookup_apiname"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string ConnectedlookupApiname + { + /// The method to get the connectedlookupApiname + /// string representing the connectedlookupApiname + get + { + return this.connectedlookupApiname; + + } + /// The method to set the value to connectedlookupApiname + /// string + set + { + this.connectedlookupApiname=value; + + this.keyModified["connectedlookup_apiname"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/NextTransition.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/NextTransition.cs new file mode 100644 index 0000000..fe4052e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/NextTransition.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class NextTransition : Model + { + private string id; + private string name; + private bool? criteriaMatched; + private string type; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public bool? CriteriaMatched + { + /// The method to get the criteriaMatched + /// bool? representing the criteriaMatched + get + { + return this.criteriaMatched; + + } + /// The method to set the value to criteriaMatched + /// bool? + set + { + this.criteriaMatched=value; + + this.keyModified["criteria_matched"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ProcessInfo.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ProcessInfo.cs new file mode 100644 index 0000000..4be9f03 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ProcessInfo.cs @@ -0,0 +1,290 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class ProcessInfo : Model + { + private long? fieldId; + private bool? isContinuous; + private string apiName; + private bool? continuous; + private string fieldLabel; + private string name; + private string columnName; + private string fieldValue; + private string id; + private string fieldName; + private Escalation escalation; + private CurrentPicklist currentPicklist; + private Dictionary keyModified=new Dictionary(); + + public long? FieldId + { + /// The method to get the fieldId + /// long? representing the fieldId + get + { + return this.fieldId; + + } + /// The method to set the value to fieldId + /// long? + set + { + this.fieldId=value; + + this.keyModified["field_id"] = 1; + + } + } + + public bool? IsContinuous + { + /// The method to get the isContinuous + /// bool? representing the isContinuous + get + { + return this.isContinuous; + + } + /// The method to set the value to isContinuous + /// bool? + set + { + this.isContinuous=value; + + this.keyModified["is_continuous"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public bool? Continuous + { + /// The method to get the continuous + /// bool? representing the continuous + get + { + return this.continuous; + + } + /// The method to set the value to continuous + /// bool? + set + { + this.continuous=value; + + this.keyModified["continuous"] = 1; + + } + } + + public string FieldLabel + { + /// The method to get the fieldLabel + /// string representing the fieldLabel + get + { + return this.fieldLabel; + + } + /// The method to set the value to fieldLabel + /// string + set + { + this.fieldLabel=value; + + this.keyModified["field_label"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string ColumnName + { + /// The method to get the columnName + /// string representing the columnName + get + { + return this.columnName; + + } + /// The method to set the value to columnName + /// string + set + { + this.columnName=value; + + this.keyModified["column_name"] = 1; + + } + } + + public string FieldValue + { + /// The method to get the fieldValue + /// string representing the fieldValue + get + { + return this.fieldValue; + + } + /// The method to set the value to fieldValue + /// string + set + { + this.fieldValue=value; + + this.keyModified["field_value"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string FieldName + { + /// The method to get the fieldName + /// string representing the fieldName + get + { + return this.fieldName; + + } + /// The method to set the value to fieldName + /// string + set + { + this.fieldName=value; + + this.keyModified["field_name"] = 1; + + } + } + + public Escalation Escalation + { + /// The method to get the escalation + /// Instance of Escalation + get + { + return this.escalation; + + } + /// The method to set the value to escalation + /// Instance of Escalation + set + { + this.escalation=value; + + this.keyModified["escalation"] = 1; + + } + } + + public CurrentPicklist CurrentPicklist + { + /// The method to get the currentPicklist + /// Instance of CurrentPicklist + get + { + return this.currentPicklist; + + } + /// The method to set the value to currentPicklist + /// Instance of CurrentPicklist + set + { + this.currentPicklist=value; + + this.keyModified["current_picklist"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Profile.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Profile.cs new file mode 100644 index 0000000..6e60d78 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Profile.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Profile : Model + { + private long? id; + private string name; + private string permissionType; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string PermissionType + { + /// The method to get the permissionType + /// string representing the permissionType + get + { + return this.permissionType; + + } + /// The method to set the value to permissionType + /// string + set + { + this.permissionType=value; + + this.keyModified["permission_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ResponseHandler.cs new file mode 100644 index 0000000..437d5c4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Blueprint +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ResponseWrapper.cs new file mode 100644 index 0000000..74833b9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private BluePrint blueprint; + private Dictionary keyModified=new Dictionary(); + + public BluePrint Blueprint + { + /// The method to get the blueprint + /// Instance of BluePrint + get + { + return this.blueprint; + + } + /// The method to set the value to blueprint + /// Instance of BluePrint + set + { + this.blueprint=value; + + this.keyModified["blueprint"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/SuccessResponse.cs new file mode 100644 index 0000000..e9eb44f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class SuccessResponse : Model, ActionHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ToolTip.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ToolTip.cs new file mode 100644 index 0000000..397c8c7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ToolTip.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class ToolTip : Model + { + private string name; + private string value; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Transition.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Transition.cs new file mode 100644 index 0000000..a4db80d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/Transition.cs @@ -0,0 +1,355 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class Transition : Model + { + private string type; + private DateTimeOffset? executionTime; + private int? sequence; + private List nextTransitions; + private Transition parentTransition; + private double? percentPartialSave; + private Record.Record data; + private string nextFieldValue; + private string textColorCode; + private string name; + private bool? criteriaMatched; + private long? id; + private List fields; + private string colorCode; + private string criteriaMessage; + private Dictionary keyModified=new Dictionary(); + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public DateTimeOffset? ExecutionTime + { + /// The method to get the executionTime + /// DateTimeOffset? representing the executionTime + get + { + return this.executionTime; + + } + /// The method to set the value to executionTime + /// DateTimeOffset? + set + { + this.executionTime=value; + + this.keyModified["execution_time"] = 1; + + } + } + + public int? Sequence + { + /// The method to get the sequence + /// int? representing the sequence + get + { + return this.sequence; + + } + /// The method to set the value to sequence + /// int? + set + { + this.sequence=value; + + this.keyModified["sequence"] = 1; + + } + } + + public List NextTransitions + { + /// The method to get the nextTransitions + /// Instance of List + get + { + return this.nextTransitions; + + } + /// The method to set the value to nextTransitions + /// Instance of List + set + { + this.nextTransitions=value; + + this.keyModified["next_transitions"] = 1; + + } + } + + public Transition ParentTransition + { + /// The method to get the parentTransition + /// Instance of Transition + get + { + return this.parentTransition; + + } + /// The method to set the value to parentTransition + /// Instance of Transition + set + { + this.parentTransition=value; + + this.keyModified["parent_transition"] = 1; + + } + } + + public double? PercentPartialSave + { + /// The method to get the percentPartialSave + /// double? representing the percentPartialSave + get + { + return this.percentPartialSave; + + } + /// The method to set the value to percentPartialSave + /// double? + set + { + this.percentPartialSave=value; + + this.keyModified["percent_partial_save"] = 1; + + } + } + + public Record.Record Data + { + /// The method to get the data + /// Instance of Record + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of Record + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public string NextFieldValue + { + /// The method to get the nextFieldValue + /// string representing the nextFieldValue + get + { + return this.nextFieldValue; + + } + /// The method to set the value to nextFieldValue + /// string + set + { + this.nextFieldValue=value; + + this.keyModified["next_field_value"] = 1; + + } + } + + public string TextColorCode + { + /// The method to get the textColorCode + /// string representing the textColorCode + get + { + return this.textColorCode; + + } + /// The method to set the value to textColorCode + /// string + set + { + this.textColorCode=value; + + this.keyModified["text_color_code"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public bool? CriteriaMatched + { + /// The method to get the criteriaMatched + /// bool? representing the criteriaMatched + get + { + return this.criteriaMatched; + + } + /// The method to set the value to criteriaMatched + /// bool? + set + { + this.criteriaMatched=value; + + this.keyModified["criteria_matched"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public string ColorCode + { + /// The method to get the colorCode + /// string representing the colorCode + get + { + return this.colorCode; + + } + /// The method to set the value to colorCode + /// string + set + { + this.colorCode=value; + + this.keyModified["color_code"] = 1; + + } + } + + public string CriteriaMessage + { + /// The method to get the criteriaMessage + /// string representing the criteriaMessage + get + { + return this.criteriaMessage; + + } + /// The method to set the value to criteriaMessage + /// string + set + { + this.criteriaMessage=value; + + this.keyModified["criteria_message"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ViewType.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ViewType.cs new file mode 100644 index 0000000..f407560 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Blueprint/ViewType.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Blueprint +{ + + public class ViewType : Model + { + private bool? view; + private bool? edit; + private bool? create; + private bool? quickCreate; + private Dictionary keyModified=new Dictionary(); + + public bool? View + { + /// The method to get the view + /// bool? representing the view + get + { + return this.view; + + } + /// The method to set the value to view + /// bool? + set + { + this.view=value; + + this.keyModified["view"] = 1; + + } + } + + public bool? Edit + { + /// The method to get the edit + /// bool? representing the edit + get + { + return this.edit; + + } + /// The method to set the value to edit + /// bool? + set + { + this.edit=value; + + this.keyModified["edit"] = 1; + + } + } + + public bool? Create + { + /// The method to get the create + /// bool? representing the create + get + { + return this.create; + + } + /// The method to set the value to create + /// bool? + set + { + this.create=value; + + this.keyModified[Constants.REQUEST_CATEGORY_CREATE] = 1; + + } + } + + public bool? QuickCreate + { + /// The method to get the quickCreate + /// bool? representing the quickCreate + get + { + return this.quickCreate; + + } + /// The method to set the value to quickCreate + /// bool? + set + { + this.quickCreate=value; + + this.keyModified["quick_create"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/APIException.cs new file mode 100644 index 0000000..1fff522 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class APIException : Model, ActionHandler, ActionResponse, ResponseHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionHandler.cs new file mode 100644 index 0000000..8e4efc2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BulkRead +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionResponse.cs new file mode 100644 index 0000000..c1caba8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BulkRead +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionWrapper.cs new file mode 100644 index 0000000..4786f96 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ActionWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary info; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public Dictionary Info + { + /// The method to get the info + /// Dictionary representing the info + get + { + return this.info; + + } + /// The method to set the value to info + /// Dictionary + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/BodyWrapper.cs new file mode 100644 index 0000000..db8563c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/BodyWrapper.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class BodyWrapper : Model + { + private CallBack callback; + private Query query; + private Choice fileType; + private Dictionary keyModified=new Dictionary(); + + public CallBack Callback + { + /// The method to get the callback + /// Instance of CallBack + get + { + return this.callback; + + } + /// The method to set the value to callback + /// Instance of CallBack + set + { + this.callback=value; + + this.keyModified["callback"] = 1; + + } + } + + public Query Query + { + /// The method to get the query + /// Instance of Query + get + { + return this.query; + + } + /// The method to set the value to query + /// Instance of Query + set + { + this.query=value; + + this.keyModified["query"] = 1; + + } + } + + public Choice FileType + { + /// The method to get the fileType + /// Instance of Choice + get + { + return this.fileType; + + } + /// The method to set the value to fileType + /// Instance of Choice + set + { + this.fileType=value; + + this.keyModified["file_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/BulkReadOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/BulkReadOperations.cs new file mode 100644 index 0000000..281bc89 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/BulkReadOperations.cs @@ -0,0 +1,88 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class BulkReadOperations + { + /// The method to create bulk read job + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateBulkReadJob(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/read"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get bulk read job details + /// long? + /// Instance of APIResponse + public APIResponse GetBulkReadJobDetails(long? jobId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/read/"); + + apiPath=string.Concat(apiPath, jobId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to download result + /// long? + /// Instance of APIResponse + public APIResponse DownloadResult(long? jobId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/read/"); + + apiPath=string.Concat(apiPath, jobId.ToString()); + + apiPath=string.Concat(apiPath, "/result"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/x-download"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/CallBack.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/CallBack.cs new file mode 100644 index 0000000..89dc6c1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/CallBack.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class CallBack : Model + { + private string url; + private Choice method; + private Dictionary keyModified=new Dictionary(); + + public string Url + { + /// The method to get the url + /// string representing the url + get + { + return this.url; + + } + /// The method to set the value to url + /// string + set + { + this.url=value; + + this.keyModified["url"] = 1; + + } + } + + public Choice Method + { + /// The method to get the method + /// Instance of Choice + get + { + return this.method; + + } + /// The method to set the value to method + /// Instance of Choice + set + { + this.method=value; + + this.keyModified["method"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Criteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Criteria.cs new file mode 100644 index 0000000..7d50e51 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Criteria.cs @@ -0,0 +1,186 @@ +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class Criteria : Model + { + private string type; + private string apiName; + private object value; + private Choice groupOperator; + private List group; + private Fields.MinifiedField field; + private Choice comparator; + private Dictionary keyModified=new Dictionary(); + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + public Choice GroupOperator + { + /// The method to get the groupOperator + /// Instance of Choice + get + { + return this.groupOperator; + + } + /// The method to set the value to groupOperator + /// Instance of Choice + set + { + this.groupOperator=value; + + this.keyModified["group_operator"] = 1; + + } + } + + public List Group + { + /// The method to get the group + /// Instance of List + get + { + return this.group; + + } + /// The method to set the value to group + /// Instance of List + set + { + this.group=value; + + this.keyModified["group"] = 1; + + } + } + + public Fields.MinifiedField Field + { + /// The method to get the field + /// Instance of MinifiedField + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of MinifiedField + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public Choice Comparator + { + /// The method to get the comparator + /// Instance of Choice + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// Instance of Choice + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/FileBodyWrapper.cs new file mode 100644 index 0000000..410a89c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/JobDetail.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/JobDetail.cs new file mode 100644 index 0000000..bb8ece3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/JobDetail.cs @@ -0,0 +1,208 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class JobDetail : Model + { + private string id; + private string operation; + private Choice state; + private Query query; + private Users.MinifiedUser createdBy; + private DateTimeOffset? createdTime; + private Result result; + private Choice fileType; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Operation + { + /// The method to get the operation + /// string representing the operation + get + { + return this.operation; + + } + /// The method to set the value to operation + /// string + set + { + this.operation=value; + + this.keyModified["operation"] = 1; + + } + } + + public Choice State + { + /// The method to get the state + /// Instance of Choice + get + { + return this.state; + + } + /// The method to set the value to state + /// Instance of Choice + set + { + this.state=value; + + this.keyModified["state"] = 1; + + } + } + + public Query Query + { + /// The method to get the query + /// Instance of Query + get + { + return this.query; + + } + /// The method to set the value to query + /// Instance of Query + set + { + this.query=value; + + this.keyModified["query"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public Result Result + { + /// The method to get the result + /// Instance of Result + get + { + return this.result; + + } + /// The method to set the value to result + /// Instance of Result + set + { + this.result=value; + + this.keyModified["result"] = 1; + + } + } + + public Choice FileType + { + /// The method to get the fileType + /// Instance of Choice + get + { + return this.fileType; + + } + /// The method to set the value to fileType + /// Instance of Choice + set + { + this.fileType=value; + + this.keyModified["file_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ModuleDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ModuleDetails.cs new file mode 100644 index 0000000..c9926be --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ModuleDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class ModuleDetails : Model + { + private string apiName; + private string module; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string Module + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Query.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Query.cs new file mode 100644 index 0000000..954e208 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Query.cs @@ -0,0 +1,186 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class Query : Model + { + private Modules.MinifiedModule module; + private long? cvid; + private List fields; + private int? page; + private Criteria criteria; + private Choice fileType; + private string pageToken; + private Dictionary keyModified=new Dictionary(); + + public Modules.MinifiedModule Module + { + /// The method to get the module + /// Instance of MinifiedModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of MinifiedModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public long? Cvid + { + /// The method to get the cvid + /// long? representing the cvid + get + { + return this.cvid; + + } + /// The method to set the value to cvid + /// long? + set + { + this.cvid=value; + + this.keyModified["cvid"] = 1; + + } + } + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public Criteria Criteria + { + /// The method to get the criteria + /// Instance of Criteria + get + { + return this.criteria; + + } + /// The method to set the value to criteria + /// Instance of Criteria + set + { + this.criteria=value; + + this.keyModified["criteria"] = 1; + + } + } + + public Choice FileType + { + /// The method to get the fileType + /// Instance of Choice + get + { + return this.fileType; + + } + /// The method to set the value to fileType + /// Instance of Choice + set + { + this.fileType=value; + + this.keyModified["file_type"] = 1; + + } + } + + public string PageToken + { + /// The method to get the pageToken + /// string representing the pageToken + get + { + return this.pageToken; + + } + /// The method to set the value to pageToken + /// string + set + { + this.pageToken=value; + + this.keyModified["page_token"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ResponseHandler.cs new file mode 100644 index 0000000..4351cee --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BulkRead +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ResponseWrapper.cs new file mode 100644 index 0000000..701dc86 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Result.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Result.cs new file mode 100644 index 0000000..c27062e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/Result.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class Result : Model + { + private int? page; + private int? count; + private string downloadUrl; + private int? perPage; + private bool? moreRecords; + private string nextPageToken; + private Dictionary keyModified=new Dictionary(); + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public string DownloadUrl + { + /// The method to get the downloadUrl + /// string representing the downloadUrl + get + { + return this.downloadUrl; + + } + /// The method to set the value to downloadUrl + /// string + set + { + this.downloadUrl=value; + + this.keyModified["download_url"] = 1; + + } + } + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + public string NextPageToken + { + /// The method to get the nextPageToken + /// string representing the nextPageToken + get + { + return this.nextPageToken; + + } + /// The method to set the value to nextPageToken + /// string + set + { + this.nextPageToken=value; + + this.keyModified["next_page_token"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/SuccessResponse.cs new file mode 100644 index 0000000..3f21212 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkRead/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkRead +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/APIException.cs new file mode 100644 index 0000000..93692b0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/APIException.cs @@ -0,0 +1,248 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class APIException : Model, ActionResponse, ResponseWrapper, ResponseHandler + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Choice errorMessage; + private int? errorCode; + private Choice xError; + private Choice info; + private Choice xInfo; + private string httpStatus; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice ErrorMessage + { + /// The method to get the errorMessage + /// Instance of Choice + get + { + return this.errorMessage; + + } + /// The method to set the value to errorMessage + /// Instance of Choice + set + { + this.errorMessage=value; + + this.keyModified["ERROR_MESSAGE"] = 1; + + } + } + + public int? ErrorCode + { + /// The method to get the errorCode + /// int? representing the errorCode + get + { + return this.errorCode; + + } + /// The method to set the value to errorCode + /// int? + set + { + this.errorCode=value; + + this.keyModified["ERROR_CODE"] = 1; + + } + } + + public Choice XError + { + /// The method to get the xError + /// Instance of Choice + get + { + return this.xError; + + } + /// The method to set the value to xError + /// Instance of Choice + set + { + this.xError=value; + + this.keyModified["x-error"] = 1; + + } + } + + public Choice Info + { + /// The method to get the info + /// Instance of Choice + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Choice + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + public Choice XInfo + { + /// The method to get the xInfo + /// Instance of Choice + get + { + return this.xInfo; + + } + /// The method to set the value to xInfo + /// Instance of Choice + set + { + this.xInfo=value; + + this.keyModified["x-info"] = 1; + + } + } + + public string HttpStatus + { + /// The method to get the httpStatus + /// string representing the httpStatus + get + { + return this.httpStatus; + + } + /// The method to set the value to httpStatus + /// string + set + { + this.httpStatus=value; + + this.keyModified["http_status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ActionResponse.cs new file mode 100644 index 0000000..22a4e34 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/BulkWriteOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/BulkWriteOperations.cs new file mode 100644 index 0000000..3b95a6d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/BulkWriteOperations.cs @@ -0,0 +1,124 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class BulkWriteOperations + { + /// The method to upload file + /// Instance of FileBodyWrapper + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse UploadFile(FileBodyWrapper request, HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "https://content.zohoapis.com/crm/v7/upload"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="multipart/form-data"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ActionResponse), "application/json"); + + + } + + /// The method to create bulk write job + /// Instance of RequestWrapper + /// Instance of APIResponse + public APIResponse CreateBulkWriteJob(RequestWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/write"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionResponse), "application/json"); + + + } + + /// The method to get bulk write job details + /// string + /// Instance of APIResponse + public APIResponse GetBulkWriteJobDetails(string jobId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/bulk/v7/write/"); + + apiPath=string.Concat(apiPath, jobId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseWrapper), "application/json"); + + + } + + /// The method to download bulk write result + /// string + /// Instance of APIResponse + public APIResponse DownloadBulkWriteResult(string downloadUrl) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, downloadUrl.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/octet-stream"); + + + } + + + public static class UploadFileHeader + { + public static readonly Header FEATURE=new Header("feature", "com.zoho.crm.api.BulkWrite.UploadFileHeader"); + public static readonly Header X_CRM_ORG=new Header("X-CRM-ORG", "com.zoho.crm.api.BulkWrite.UploadFileHeader"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/BulkWriteResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/BulkWriteResponse.cs new file mode 100644 index 0000000..3b10e84 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/BulkWriteResponse.cs @@ -0,0 +1,229 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class BulkWriteResponse : Model, ResponseWrapper + { + private string status; + private string characterEncoding; + private List resource; + private string id; + private Result result; + private Users.MinifiedUser createdBy; + private string operation; + private DateTimeOffset? createdTime; + private CallBack callback; + private Dictionary keyModified=new Dictionary(); + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public string CharacterEncoding + { + /// The method to get the characterEncoding + /// string representing the characterEncoding + get + { + return this.characterEncoding; + + } + /// The method to set the value to characterEncoding + /// string + set + { + this.characterEncoding=value; + + this.keyModified["character_encoding"] = 1; + + } + } + + public List Resource + { + /// The method to get the resource + /// Instance of List + get + { + return this.resource; + + } + /// The method to set the value to resource + /// Instance of List + set + { + this.resource=value; + + this.keyModified["resource"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public Result Result + { + /// The method to get the result + /// Instance of Result + get + { + return this.result; + + } + /// The method to set the value to result + /// Instance of Result + set + { + this.result=value; + + this.keyModified["result"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public string Operation + { + /// The method to get the operation + /// string representing the operation + get + { + return this.operation; + + } + /// The method to set the value to operation + /// string + set + { + this.operation=value; + + this.keyModified["operation"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public CallBack Callback + { + /// The method to get the callback + /// Instance of CallBack + get + { + return this.callback; + + } + /// The method to set the value to callback + /// Instance of CallBack + set + { + this.callback=value; + + this.keyModified["callback"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/CallBack.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/CallBack.cs new file mode 100644 index 0000000..6881020 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/CallBack.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class CallBack : Model + { + private string url; + private Choice method; + private Dictionary keyModified=new Dictionary(); + + public string Url + { + /// The method to get the url + /// string representing the url + get + { + return this.url; + + } + /// The method to set the value to url + /// string + set + { + this.url=value; + + this.keyModified["url"] = 1; + + } + } + + public Choice Method + { + /// The method to get the method + /// Instance of Choice + get + { + return this.method; + + } + /// The method to set the value to method + /// Instance of Choice + set + { + this.method=value; + + this.keyModified["method"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/DefaultValue.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/DefaultValue.cs new file mode 100644 index 0000000..a666fc2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/DefaultValue.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class DefaultValue : Model + { + private string name; + private string module; + private object value; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Module + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/FieldMapping.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/FieldMapping.cs new file mode 100644 index 0000000..6ac29a8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/FieldMapping.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class FieldMapping : Model + { + private string apiName; + private int? index; + private string format; + private string findBy; + private DefaultValue defaultValue; + private string module; + private int? parentColumnIndex; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public int? Index + { + /// The method to get the index + /// int? representing the index + get + { + return this.index; + + } + /// The method to set the value to index + /// int? + set + { + this.index=value; + + this.keyModified["index"] = 1; + + } + } + + public string Format + { + /// The method to get the format + /// string representing the format + get + { + return this.format; + + } + /// The method to set the value to format + /// string + set + { + this.format=value; + + this.keyModified["format"] = 1; + + } + } + + public string FindBy + { + /// The method to get the findBy + /// string representing the findBy + get + { + return this.findBy; + + } + /// The method to set the value to findBy + /// string + set + { + this.findBy=value; + + this.keyModified["find_by"] = 1; + + } + } + + public DefaultValue DefaultValue + { + /// The method to get the defaultValue + /// Instance of DefaultValue + get + { + return this.defaultValue; + + } + /// The method to set the value to defaultValue + /// Instance of DefaultValue + set + { + this.defaultValue=value; + + this.keyModified["default_value"] = 1; + + } + } + + public string Module + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public int? ParentColumnIndex + { + /// The method to get the parentColumnIndex + /// int? representing the parentColumnIndex + get + { + return this.parentColumnIndex; + + } + /// The method to set the value to parentColumnIndex + /// int? + set + { + this.parentColumnIndex=value; + + this.keyModified["parent_column_index"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/File.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/File.cs new file mode 100644 index 0000000..1bd98b1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/File.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class File : Model + { + private Choice status; + private string name; + private int? addedCount; + private int? skippedCount; + private int? updatedCount; + private int? totalCount; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public int? AddedCount + { + /// The method to get the addedCount + /// int? representing the addedCount + get + { + return this.addedCount; + + } + /// The method to set the value to addedCount + /// int? + set + { + this.addedCount=value; + + this.keyModified["added_count"] = 1; + + } + } + + public int? SkippedCount + { + /// The method to get the skippedCount + /// int? representing the skippedCount + get + { + return this.skippedCount; + + } + /// The method to set the value to skippedCount + /// int? + set + { + this.skippedCount=value; + + this.keyModified["skipped_count"] = 1; + + } + } + + public int? UpdatedCount + { + /// The method to get the updatedCount + /// int? representing the updatedCount + get + { + return this.updatedCount; + + } + /// The method to set the value to updatedCount + /// int? + set + { + this.updatedCount=value; + + this.keyModified["updated_count"] = 1; + + } + } + + public int? TotalCount + { + /// The method to get the totalCount + /// int? representing the totalCount + get + { + return this.totalCount; + + } + /// The method to set the value to totalCount + /// int? + set + { + this.totalCount=value; + + this.keyModified["total_count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/FileBodyWrapper.cs new file mode 100644 index 0000000..1b53f56 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/RequestWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/RequestWrapper.cs new file mode 100644 index 0000000..54e8574 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/RequestWrapper.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class RequestWrapper : Model + { + private string characterEncoding; + private Choice operation; + private CallBack callback; + private List resource; + private bool? ignoreEmpty; + private Dictionary keyModified=new Dictionary(); + + public string CharacterEncoding + { + /// The method to get the characterEncoding + /// string representing the characterEncoding + get + { + return this.characterEncoding; + + } + /// The method to set the value to characterEncoding + /// string + set + { + this.characterEncoding=value; + + this.keyModified["character_encoding"] = 1; + + } + } + + public Choice Operation + { + /// The method to get the operation + /// Instance of Choice + get + { + return this.operation; + + } + /// The method to set the value to operation + /// Instance of Choice + set + { + this.operation=value; + + this.keyModified["operation"] = 1; + + } + } + + public CallBack Callback + { + /// The method to get the callback + /// Instance of CallBack + get + { + return this.callback; + + } + /// The method to set the value to callback + /// Instance of CallBack + set + { + this.callback=value; + + this.keyModified["callback"] = 1; + + } + } + + public List Resource + { + /// The method to get the resource + /// Instance of List + get + { + return this.resource; + + } + /// The method to set the value to resource + /// Instance of List + set + { + this.resource=value; + + this.keyModified["resource"] = 1; + + } + } + + public bool? IgnoreEmpty + { + /// The method to get the ignoreEmpty + /// bool? representing the ignoreEmpty + get + { + return this.ignoreEmpty; + + } + /// The method to set the value to ignoreEmpty + /// bool? + set + { + this.ignoreEmpty=value; + + this.keyModified["ignore_empty"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/Resource.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/Resource.cs new file mode 100644 index 0000000..9f3515d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/Resource.cs @@ -0,0 +1,249 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class Resource : Model + { + private Choice status; + private Choice type; + private Modules.MinifiedModule module; + private string code; + private string fileId; + private List fileNames; + private bool? ignoreEmpty; + private string findBy; + private List fieldMappings; + private File file; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public Modules.MinifiedModule Module + { + /// The method to get the module + /// Instance of MinifiedModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of MinifiedModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public string Code + { + /// The method to get the code + /// string representing the code + get + { + return this.code; + + } + /// The method to set the value to code + /// string + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string FileId + { + /// The method to get the fileId + /// string representing the fileId + get + { + return this.fileId; + + } + /// The method to set the value to fileId + /// string + set + { + this.fileId=value; + + this.keyModified["file_id"] = 1; + + } + } + + public List FileNames + { + /// The method to get the fileNames + /// Instance of List + get + { + return this.fileNames; + + } + /// The method to set the value to fileNames + /// Instance of List + set + { + this.fileNames=value; + + this.keyModified["file_names"] = 1; + + } + } + + public bool? IgnoreEmpty + { + /// The method to get the ignoreEmpty + /// bool? representing the ignoreEmpty + get + { + return this.ignoreEmpty; + + } + /// The method to set the value to ignoreEmpty + /// bool? + set + { + this.ignoreEmpty=value; + + this.keyModified["ignore_empty"] = 1; + + } + } + + public string FindBy + { + /// The method to get the findBy + /// string representing the findBy + get + { + return this.findBy; + + } + /// The method to set the value to findBy + /// string + set + { + this.findBy=value; + + this.keyModified["find_by"] = 1; + + } + } + + public List FieldMappings + { + /// The method to get the fieldMappings + /// Instance of List + get + { + return this.fieldMappings; + + } + /// The method to set the value to fieldMappings + /// Instance of List + set + { + this.fieldMappings=value; + + this.keyModified["field_mappings"] = 1; + + } + } + + public File File + { + /// The method to get the file + /// FileInfo representing the file + get + { + return this.file; + + } + /// The method to set the value to file + /// FileInfo + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ResponseHandler.cs new file mode 100644 index 0000000..3a05a27 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ResponseWrapper.cs new file mode 100644 index 0000000..2a44a7c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/ResponseWrapper.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public interface ResponseWrapper + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/Result.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/Result.cs new file mode 100644 index 0000000..d37295b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/Result.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class Result : Model + { + private string downloadUrl; + private Dictionary keyModified=new Dictionary(); + + public string DownloadUrl + { + /// The method to get the downloadUrl + /// string representing the downloadUrl + get + { + return this.downloadUrl; + + } + /// The method to set the value to downloadUrl + /// string + set + { + this.downloadUrl=value; + + this.keyModified["download_url"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/SuccessResponse.cs new file mode 100644 index 0000000..7574465 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BulkWrite/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BulkWrite +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/APIException.cs new file mode 100644 index 0000000..44f02cc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class APIException : Model, ActionHandler, ActionResponse, ResponseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionHandler.cs new file mode 100644 index 0000000..afc7bcf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionResponse.cs new file mode 100644 index 0000000..aee6a5c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionWrapper.cs new file mode 100644 index 0000000..40fa210 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class ActionWrapper : Model, ActionHandler + { + private ActionResponse businessHours; + private Dictionary keyModified=new Dictionary(); + + public ActionResponse BusinessHours + { + /// The method to get the businessHours + /// Instance of ActionResponse + get + { + return this.businessHours; + + } + /// The method to set the value to businessHours + /// Instance of ActionResponse + set + { + this.businessHours=value; + + this.keyModified["business_hours"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BodyWrapper.cs new file mode 100644 index 0000000..a73d111 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class BodyWrapper : Model + { + private BusinessHours businessHours; + private Dictionary keyModified=new Dictionary(); + + public BusinessHours BusinessHours + { + /// The method to get the businessHours + /// Instance of BusinessHours + get + { + return this.businessHours; + + } + /// The method to set the value to businessHours + /// Instance of BusinessHours + set + { + this.businessHours=value; + + this.keyModified["business_hours"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BreakHoursCustomTiming.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BreakHoursCustomTiming.cs new file mode 100644 index 0000000..971d92b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BreakHoursCustomTiming.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class BreakHoursCustomTiming : Model + { + private Choice days; + private List businessTiming; + private Dictionary keyModified=new Dictionary(); + + public Choice Days + { + /// The method to get the days + /// Instance of Choice + get + { + return this.days; + + } + /// The method to set the value to days + /// Instance of Choice + set + { + this.days=value; + + this.keyModified["days"] = 1; + + } + } + + public List BusinessTiming + { + /// The method to get the businessTiming + /// Instance of List + get + { + return this.businessTiming; + + } + /// The method to set the value to businessTiming + /// Instance of List + set + { + this.businessTiming=value; + + this.keyModified["business_timing"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BusinessHours.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BusinessHours.cs new file mode 100644 index 0000000..fd58dc1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BusinessHours.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class BusinessHours : Model + { + private Choice weekStartsOn; + private Choice type; + private long? id; + private List> businessDays; + private bool? sameAsEveryday; + private List dailyTiming; + private List customTiming; + private Dictionary keyModified=new Dictionary(); + + public Choice WeekStartsOn + { + /// The method to get the weekStartsOn + /// Instance of Choice + get + { + return this.weekStartsOn; + + } + /// The method to set the value to weekStartsOn + /// Instance of Choice + set + { + this.weekStartsOn=value; + + this.keyModified["week_starts_on"] = 1; + + } + } + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public List> BusinessDays + { + /// The method to get the businessDays + /// Instance of List + get + { + return this.businessDays; + + } + /// The method to set the value to businessDays + /// Instance of List + set + { + this.businessDays=value; + + this.keyModified["business_days"] = 1; + + } + } + + public bool? SameAsEveryday + { + /// The method to get the sameAsEveryday + /// bool? representing the sameAsEveryday + get + { + return this.sameAsEveryday; + + } + /// The method to set the value to sameAsEveryday + /// bool? + set + { + this.sameAsEveryday=value; + + this.keyModified["same_as_everyday"] = 1; + + } + } + + public List DailyTiming + { + /// The method to get the dailyTiming + /// Instance of List + get + { + return this.dailyTiming; + + } + /// The method to set the value to dailyTiming + /// Instance of List + set + { + this.dailyTiming=value; + + this.keyModified["daily_timing"] = 1; + + } + } + + public List CustomTiming + { + /// The method to get the customTiming + /// Instance of List + get + { + return this.customTiming; + + } + /// The method to set the value to customTiming + /// Instance of List + set + { + this.customTiming=value; + + this.keyModified["custom_timing"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BusinessHoursOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BusinessHoursOperations.cs new file mode 100644 index 0000000..564f993 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/BusinessHoursOperations.cs @@ -0,0 +1,120 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class BusinessHoursOperations + { + private string xCrmOrg; + + /// /// Creates an instance of BusinessHoursOperations with the given parameters + /// string + + public BusinessHoursOperations(string xCrmOrg) + { + this.xCrmOrg=xCrmOrg; + + + } + + /// The method to create business hours + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateBusinessHours(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/business_hours"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.BusinessHours.CreateBusinessHoursHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update business hours + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateBusinessHours(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/business_hours"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.BusinessHours.UpdateBusinessHoursHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get business hours + /// Instance of APIResponse + public APIResponse GetBusinessHours() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/business_hours"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.BusinessHours.GetBusinessHoursHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class CreateBusinessHoursHeader + { + } + + + public static class UpdateBusinessHoursHeader + { + } + + + public static class GetBusinessHoursHeader + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/Features.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/Features.cs new file mode 100644 index 0000000..201e3e8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/Features.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class Features : Model + { + private string name; + private List resources; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public List Resources + { + /// The method to get the resources + /// Instance of List + get + { + return this.resources; + + } + /// The method to set the value to resources + /// Instance of List + set + { + this.resources=value; + + this.keyModified["resources"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/Resources.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/Resources.cs new file mode 100644 index 0000000..50289fe --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/Resources.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class Resources : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ResponseHandler.cs new file mode 100644 index 0000000..f3e2a97 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ResponseWrapper.cs new file mode 100644 index 0000000..4f1f5bf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private BusinessHours businessHours; + private Dictionary keyModified=new Dictionary(); + + public BusinessHours BusinessHours + { + /// The method to get the businessHours + /// Instance of BusinessHours + get + { + return this.businessHours; + + } + /// The method to set the value to businessHours + /// Instance of BusinessHours + set + { + this.businessHours=value; + + this.keyModified["business_hours"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/SuccessResponse.cs new file mode 100644 index 0000000..065ee85 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/BusinessHours/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.BusinessHours +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/APIException.cs new file mode 100644 index 0000000..8c8324a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class APIException : Model + { + private Dictionary details; + private Choice code; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Cadences.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Cadences.cs new file mode 100644 index 0000000..e03a95a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Cadences.cs @@ -0,0 +1,332 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class Cadences : Model + { + private Summary summary; + private string createdTime; + private Module module; + private bool? active; + private ExecutionDetail executionDetails; + private bool? published; + private string type; + private User createdBy; + private string modifiedTime; + private string name; + private User modifiedBy; + private long? id; + private CustomView customView; + private string status; + private Dictionary keyModified=new Dictionary(); + + public Summary Summary + { + /// The method to get the summary + /// Instance of Summary + get + { + return this.summary; + + } + /// The method to set the value to summary + /// Instance of Summary + set + { + this.summary=value; + + this.keyModified["summary"] = 1; + + } + } + + public string CreatedTime + { + /// The method to get the createdTime + /// string representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// string + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public bool? Active + { + /// The method to get the active + /// bool? representing the active + get + { + return this.active; + + } + /// The method to set the value to active + /// bool? + set + { + this.active=value; + + this.keyModified["active"] = 1; + + } + } + + public ExecutionDetail ExecutionDetails + { + /// The method to get the executionDetails + /// Instance of ExecutionDetail + get + { + return this.executionDetails; + + } + /// The method to set the value to executionDetails + /// Instance of ExecutionDetail + set + { + this.executionDetails=value; + + this.keyModified["execution_details"] = 1; + + } + } + + public bool? Published + { + /// The method to get the published + /// bool? representing the published + get + { + return this.published; + + } + /// The method to set the value to published + /// bool? + set + { + this.published=value; + + this.keyModified["published"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public User CreatedBy + { + /// The method to get the createdBy + /// Instance of User + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of User + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public string ModifiedTime + { + /// The method to get the modifiedTime + /// string representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// string + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public User ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of User + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of User + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public CustomView CustomView + { + /// The method to get the customView + /// Instance of CustomView + get + { + return this.customView; + + } + /// The method to set the value to customView + /// Instance of CustomView + set + { + this.customView=value; + + this.keyModified["custom_view"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/CustomView.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/CustomView.cs new file mode 100644 index 0000000..55ad88f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/CustomView.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class CustomView : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/ExecuteEvery.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/ExecuteEvery.cs new file mode 100644 index 0000000..cfba297 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/ExecuteEvery.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class ExecuteEvery : Model + { + private int? unit; + private string period; + private Dictionary keyModified=new Dictionary(); + + public int? Unit + { + /// The method to get the unit + /// int? representing the unit + get + { + return this.unit; + + } + /// The method to set the value to unit + /// int? + set + { + this.unit=value; + + this.keyModified["unit"] = 1; + + } + } + + public string Period + { + /// The method to get the period + /// string representing the period + get + { + return this.period; + + } + /// The method to set the value to period + /// string + set + { + this.period=value; + + this.keyModified["period"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/ExecutionDetail.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/ExecutionDetail.cs new file mode 100644 index 0000000..24cd790 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/ExecutionDetail.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class ExecutionDetail : Model + { + private UnenrollProperty unenrollProperties; + private string endDate; + private bool? automaticUnenroll; + private string type; + private ExecuteEvery executeEvery; + private Dictionary keyModified=new Dictionary(); + + public UnenrollProperty UnenrollProperties + { + /// The method to get the unenrollProperties + /// Instance of UnenrollProperty + get + { + return this.unenrollProperties; + + } + /// The method to set the value to unenrollProperties + /// Instance of UnenrollProperty + set + { + this.unenrollProperties=value; + + this.keyModified["unenroll_properties"] = 1; + + } + } + + public string EndDate + { + /// The method to get the endDate + /// string representing the endDate + get + { + return this.endDate; + + } + /// The method to set the value to endDate + /// string + set + { + this.endDate=value; + + this.keyModified["end_date"] = 1; + + } + } + + public bool? AutomaticUnenroll + { + /// The method to get the automaticUnenroll + /// bool? representing the automaticUnenroll + get + { + return this.automaticUnenroll; + + } + /// The method to set the value to automaticUnenroll + /// bool? + set + { + this.automaticUnenroll=value; + + this.keyModified["automatic_unenroll"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public ExecuteEvery ExecuteEvery + { + /// The method to get the executeEvery + /// Instance of ExecuteEvery + get + { + return this.executeEvery; + + } + /// The method to set the value to executeEvery + /// Instance of ExecuteEvery + set + { + this.executeEvery=value; + + this.keyModified["execute_every"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Info.cs new file mode 100644 index 0000000..34c765b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class Info : Model + { + private int? perPage; + private int? count; + private int? page; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Module.cs new file mode 100644 index 0000000..a98d0d9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class Module : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Summary.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Summary.cs new file mode 100644 index 0000000..9393132 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/Summary.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class Summary : Model + { + private int? taskFollowUpCount; + private int? callFollowUpCount; + private int? emailFollowUpCount; + private Dictionary keyModified=new Dictionary(); + + public int? TaskFollowUpCount + { + /// The method to get the taskFollowUpCount + /// int? representing the taskFollowUpCount + get + { + return this.taskFollowUpCount; + + } + /// The method to set the value to taskFollowUpCount + /// int? + set + { + this.taskFollowUpCount=value; + + this.keyModified["task_follow_up_count"] = 1; + + } + } + + public int? CallFollowUpCount + { + /// The method to get the callFollowUpCount + /// int? representing the callFollowUpCount + get + { + return this.callFollowUpCount; + + } + /// The method to set the value to callFollowUpCount + /// int? + set + { + this.callFollowUpCount=value; + + this.keyModified["call_follow_up_count"] = 1; + + } + } + + public int? EmailFollowUpCount + { + /// The method to get the emailFollowUpCount + /// int? representing the emailFollowUpCount + get + { + return this.emailFollowUpCount; + + } + /// The method to set the value to emailFollowUpCount + /// int? + set + { + this.emailFollowUpCount=value; + + this.keyModified["email_follow_up_count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/UnenrollProperty.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/UnenrollProperty.cs new file mode 100644 index 0000000..db26a88 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/UnenrollProperty.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class UnenrollProperty : Model + { + private string endDate; + private string type; + private Dictionary keyModified=new Dictionary(); + + public string EndDate + { + /// The method to get the endDate + /// string representing the endDate + get + { + return this.endDate; + + } + /// The method to set the value to endDate + /// string + set + { + this.endDate=value; + + this.keyModified["end_date"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/User.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/User.cs new file mode 100644 index 0000000..1a16a96 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Cadences/User.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Cadences +{ + + public class User : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/APIException.cs new file mode 100644 index 0000000..45eab57 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class APIException : Model, ActionResponse, ActionHandler + { + private Dictionary details; + private Choice code; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Action.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Action.cs new file mode 100644 index 0000000..10a4c6b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Action.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class Action : Model + { + private Details details; + private string type; + private Dictionary keyModified=new Dictionary(); + + public Details Details + { + /// The method to get the details + /// Instance of Details + get + { + return this.details; + + } + /// The method to set the value to details + /// Instance of Details + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionHandler.cs new file mode 100644 index 0000000..04cf08b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionResponse.cs new file mode 100644 index 0000000..a75bbe0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionWrapper.cs new file mode 100644 index 0000000..77a414d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Analytics.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Analytics.cs new file mode 100644 index 0000000..42b1a07 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Analytics.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class Analytics : Model + { + private Dictionary analytics; + private ParentFollowUp parentFollowUp; + private Action action; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public Dictionary Analytics_1 + { + /// The method to get the analytics + /// Dictionary representing the analytics + get + { + return this.analytics; + + } + /// The method to set the value to analytics + /// Dictionary + set + { + this.analytics=value; + + this.keyModified["analytics"] = 1; + + } + } + + public ParentFollowUp ParentFollowUp + { + /// The method to get the parentFollowUp + /// Instance of ParentFollowUp + get + { + return this.parentFollowUp; + + } + /// The method to set the value to parentFollowUp + /// Instance of ParentFollowUp + set + { + this.parentFollowUp=value; + + this.keyModified["parent_follow_up"] = 1; + + } + } + + public Action Action + { + /// The method to get the action + /// Instance of Action + get + { + return this.action; + + } + /// The method to set the value to action + /// Instance of Action + set + { + this.action=value; + + this.keyModified[Constants.REQUEST_CATEGORY_ACTION] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsAlert.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsAlert.cs new file mode 100644 index 0000000..cd98a6b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsAlert.cs @@ -0,0 +1,227 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class AnalyticsAlert : Model + { + private int? emailCount; + private int? clikedEmailCount; + private int? bouncedEmailCount; + private int? repliedEmailCount; + private int? emailSpamCount; + private int? sentEmailCount; + private int? unsentEmailCount; + private int? openedEmailCount; + private int? unsubscribedEmailCount; + private Dictionary keyModified=new Dictionary(); + + public int? EmailCount + { + /// The method to get the emailCount + /// int? representing the emailCount + get + { + return this.emailCount; + + } + /// The method to set the value to emailCount + /// int? + set + { + this.emailCount=value; + + this.keyModified["email_count"] = 1; + + } + } + + public int? ClikedEmailCount + { + /// The method to get the clikedEmailCount + /// int? representing the clikedEmailCount + get + { + return this.clikedEmailCount; + + } + /// The method to set the value to clikedEmailCount + /// int? + set + { + this.clikedEmailCount=value; + + this.keyModified["cliked_email_count"] = 1; + + } + } + + public int? BouncedEmailCount + { + /// The method to get the bouncedEmailCount + /// int? representing the bouncedEmailCount + get + { + return this.bouncedEmailCount; + + } + /// The method to set the value to bouncedEmailCount + /// int? + set + { + this.bouncedEmailCount=value; + + this.keyModified["bounced_email_count"] = 1; + + } + } + + public int? RepliedEmailCount + { + /// The method to get the repliedEmailCount + /// int? representing the repliedEmailCount + get + { + return this.repliedEmailCount; + + } + /// The method to set the value to repliedEmailCount + /// int? + set + { + this.repliedEmailCount=value; + + this.keyModified["replied_email_count"] = 1; + + } + } + + public int? EmailSpamCount + { + /// The method to get the emailSpamCount + /// int? representing the emailSpamCount + get + { + return this.emailSpamCount; + + } + /// The method to set the value to emailSpamCount + /// int? + set + { + this.emailSpamCount=value; + + this.keyModified["email_spam_count"] = 1; + + } + } + + public int? SentEmailCount + { + /// The method to get the sentEmailCount + /// int? representing the sentEmailCount + get + { + return this.sentEmailCount; + + } + /// The method to set the value to sentEmailCount + /// int? + set + { + this.sentEmailCount=value; + + this.keyModified["sent_email_count"] = 1; + + } + } + + public int? UnsentEmailCount + { + /// The method to get the unsentEmailCount + /// int? representing the unsentEmailCount + get + { + return this.unsentEmailCount; + + } + /// The method to set the value to unsentEmailCount + /// int? + set + { + this.unsentEmailCount=value; + + this.keyModified["unsent_email_count"] = 1; + + } + } + + public int? OpenedEmailCount + { + /// The method to get the openedEmailCount + /// int? representing the openedEmailCount + get + { + return this.openedEmailCount; + + } + /// The method to set the value to openedEmailCount + /// int? + set + { + this.openedEmailCount=value; + + this.keyModified["opened_email_count"] = 1; + + } + } + + public int? UnsubscribedEmailCount + { + /// The method to get the unsubscribedEmailCount + /// int? representing the unsubscribedEmailCount + get + { + return this.unsubscribedEmailCount; + + } + /// The method to set the value to unsubscribedEmailCount + /// int? + set + { + this.unsubscribedEmailCount=value; + + this.keyModified["unsubscribed_email_count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsCall.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsCall.cs new file mode 100644 index 0000000..1229506 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsCall.cs @@ -0,0 +1,206 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class AnalyticsCall : Model + { + private int? createdCallsCount; + private int? cancelledCallsCount; + private int? failedCallsCount; + private int? completedCallsCount; + private int? scheduledCallsCount; + private int? callsCount; + private int? overdueCallsCount; + private int? missedCallsCount; + private Dictionary keyModified=new Dictionary(); + + public int? CreatedCallsCount + { + /// The method to get the createdCallsCount + /// int? representing the createdCallsCount + get + { + return this.createdCallsCount; + + } + /// The method to set the value to createdCallsCount + /// int? + set + { + this.createdCallsCount=value; + + this.keyModified["created_calls_count"] = 1; + + } + } + + public int? CancelledCallsCount + { + /// The method to get the cancelledCallsCount + /// int? representing the cancelledCallsCount + get + { + return this.cancelledCallsCount; + + } + /// The method to set the value to cancelledCallsCount + /// int? + set + { + this.cancelledCallsCount=value; + + this.keyModified["cancelled_calls_count"] = 1; + + } + } + + public int? FailedCallsCount + { + /// The method to get the failedCallsCount + /// int? representing the failedCallsCount + get + { + return this.failedCallsCount; + + } + /// The method to set the value to failedCallsCount + /// int? + set + { + this.failedCallsCount=value; + + this.keyModified["failed_calls_count"] = 1; + + } + } + + public int? CompletedCallsCount + { + /// The method to get the completedCallsCount + /// int? representing the completedCallsCount + get + { + return this.completedCallsCount; + + } + /// The method to set the value to completedCallsCount + /// int? + set + { + this.completedCallsCount=value; + + this.keyModified["completed_calls_count"] = 1; + + } + } + + public int? ScheduledCallsCount + { + /// The method to get the scheduledCallsCount + /// int? representing the scheduledCallsCount + get + { + return this.scheduledCallsCount; + + } + /// The method to set the value to scheduledCallsCount + /// int? + set + { + this.scheduledCallsCount=value; + + this.keyModified["scheduled_calls_count"] = 1; + + } + } + + public int? CallsCount + { + /// The method to get the callsCount + /// int? representing the callsCount + get + { + return this.callsCount; + + } + /// The method to set the value to callsCount + /// int? + set + { + this.callsCount=value; + + this.keyModified["calls_count"] = 1; + + } + } + + public int? OverdueCallsCount + { + /// The method to get the overdueCallsCount + /// int? representing the overdueCallsCount + get + { + return this.overdueCallsCount; + + } + /// The method to set the value to overdueCallsCount + /// int? + set + { + this.overdueCallsCount=value; + + this.keyModified["overdue_calls_count"] = 1; + + } + } + + public int? MissedCallsCount + { + /// The method to get the missedCallsCount + /// int? representing the missedCallsCount + get + { + return this.missedCallsCount; + + } + /// The method to set the value to missedCallsCount + /// int? + set + { + this.missedCallsCount=value; + + this.keyModified["missed_calls_count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsTask.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsTask.cs new file mode 100644 index 0000000..4501ba0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/AnalyticsTask.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class AnalyticsTask : Model + { + private int? openTasksCount; + private int? failedTasksCount; + private string subject; + private int? completedTasksCount; + private int? createdTasksCount; + private int? tasksCount; + private Dictionary keyModified=new Dictionary(); + + public int? OpenTasksCount + { + /// The method to get the openTasksCount + /// int? representing the openTasksCount + get + { + return this.openTasksCount; + + } + /// The method to set the value to openTasksCount + /// int? + set + { + this.openTasksCount=value; + + this.keyModified["open_tasks_count"] = 1; + + } + } + + public int? FailedTasksCount + { + /// The method to get the failedTasksCount + /// int? representing the failedTasksCount + get + { + return this.failedTasksCount; + + } + /// The method to set the value to failedTasksCount + /// int? + set + { + this.failedTasksCount=value; + + this.keyModified["failed_tasks_count"] = 1; + + } + } + + public string Subject + { + /// The method to get the subject + /// string representing the subject + get + { + return this.subject; + + } + /// The method to set the value to subject + /// string + set + { + this.subject=value; + + this.keyModified["subject"] = 1; + + } + } + + public int? CompletedTasksCount + { + /// The method to get the completedTasksCount + /// int? representing the completedTasksCount + get + { + return this.completedTasksCount; + + } + /// The method to set the value to completedTasksCount + /// int? + set + { + this.completedTasksCount=value; + + this.keyModified["completed_tasks_count"] = 1; + + } + } + + public int? CreatedTasksCount + { + /// The method to get the createdTasksCount + /// int? representing the createdTasksCount + get + { + return this.createdTasksCount; + + } + /// The method to set the value to createdTasksCount + /// int? + set + { + this.createdTasksCount=value; + + this.keyModified["created_tasks_count"] = 1; + + } + } + + public int? TasksCount + { + /// The method to get the tasksCount + /// int? representing the tasksCount + get + { + return this.tasksCount; + + } + /// The method to set the value to tasksCount + /// int? + set + { + this.tasksCount=value; + + this.keyModified["tasks_count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/BodyWrapper.cs new file mode 100644 index 0000000..21054c1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/BodyWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class BodyWrapper : Model + { + private List cadencesIds; + private List ids; + private Dictionary keyModified=new Dictionary(); + + public List CadencesIds + { + /// The method to get the cadencesIds + /// Instance of List + get + { + return this.cadencesIds; + + } + /// The method to set the value to cadencesIds + /// Instance of List + set + { + this.cadencesIds=value; + + this.keyModified["cadences_ids"] = 1; + + } + } + + public List Ids + { + /// The method to get the ids + /// Instance of List + get + { + return this.ids; + + } + /// The method to set the value to ids + /// Instance of List + set + { + this.ids=value; + + this.keyModified["ids"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Cadence.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Cadence.cs new file mode 100644 index 0000000..327c53b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Cadence.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class Cadence : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/CadencesAnalyticsGet.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/CadencesAnalyticsGet.cs new file mode 100644 index 0000000..1cfca59 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/CadencesAnalyticsGet.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class CadencesAnalyticsGet : Model + { + private Module module; + private string name; + private List followUps; + private long? id; + private User createdBy; + private Dictionary keyModified=new Dictionary(); + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public List FollowUps + { + /// The method to get the followUps + /// Instance of List + get + { + return this.followUps; + + } + /// The method to set the value to followUps + /// Instance of List + set + { + this.followUps=value; + + this.keyModified["follow_ups"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public User CreatedBy + { + /// The method to get the createdBy + /// Instance of User + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of User + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/CadencesExecutionOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/CadencesExecutionOperations.cs new file mode 100644 index 0000000..c4eb2b3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/CadencesExecutionOperations.cs @@ -0,0 +1,72 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class CadencesExecutionOperations + { + /// The method to enrol cadences + /// string + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse EnrolCadences(string module, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/enrol_in_cadences"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to unenrol cadences + /// string + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UnenrolCadences(string module, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/unenrol_from_cadences"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Details.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Details.cs new file mode 100644 index 0000000..82a3474 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Details.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class Details : Model + { + private string name; + private Template template; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public Template Template + { + /// The method to get the template + /// Instance of Template + get + { + return this.template; + + } + /// The method to set the value to template + /// Instance of Template + set + { + this.template=value; + + this.keyModified["template"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Module.cs new file mode 100644 index 0000000..a8676d8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class Module : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ParentFollowUp.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ParentFollowUp.cs new file mode 100644 index 0000000..b8089b8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/ParentFollowUp.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class ParentFollowUp : Model + { + private long? id; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/SuccessResponse.cs new file mode 100644 index 0000000..40229cd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Template.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Template.cs new file mode 100644 index 0000000..b77a072 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/Template.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class Template : Model + { + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/User.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/User.cs new file mode 100644 index 0000000..bd54d73 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CadencesExecution/User.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CadencesExecution +{ + + public class User : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/APIException.cs new file mode 100644 index 0000000..642e03b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public class APIException : Model, ActionResponse, ActionHandler + { + private Choice code; + private string message; + private Dictionary details; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionHandler.cs new file mode 100644 index 0000000..effa01d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionResponse.cs new file mode 100644 index 0000000..feebdf5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionWrapper.cs new file mode 100644 index 0000000..6e21f42 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/BodyWrapper.cs new file mode 100644 index 0000000..67178c0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public class BodyWrapper : Model + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/CancelMeetingsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/CancelMeetingsOperations.cs new file mode 100644 index 0000000..8537580 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/CancelMeetingsOperations.cs @@ -0,0 +1,52 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public class CancelMeetingsOperations + { + private long? event1; + + /// /// Creates an instance of CancelMeetingsOperations with the given parameters + /// long? + + public CancelMeetingsOperations(long? event1) + { + this.event1=event1; + + + } + + /// The method to cancel meetings + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CancelMeetings(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Events/"); + + apiPath=string.Concat(apiPath, this.event1.ToString()); + + apiPath=string.Concat(apiPath, "/actions/cancel"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/Notify.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/Notify.cs new file mode 100644 index 0000000..5d31907 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/Notify.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public class Notify : Model + { + private bool? sendCancellingMail; + private Dictionary keyModified=new Dictionary(); + + public bool? SendCancellingMail + { + /// The method to get the sendCancellingMail + /// bool? representing the sendCancellingMail + get + { + return this.sendCancellingMail; + + } + /// The method to set the value to sendCancellingMail + /// bool? + set + { + this.sendCancellingMail=value; + + this.keyModified["send_cancelling_mail"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/SuccessResponse.cs new file mode 100644 index 0000000..90dc3b0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CancelMeetings/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CancelMeetings +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/APIException.cs new file mode 100644 index 0000000..fcbcc65 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class APIException : Model, ActionResponse, ActionHandler + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionHandler.cs new file mode 100644 index 0000000..9783b0f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionResponse.cs new file mode 100644 index 0000000..1c1bda5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionWrapper.cs new file mode 100644 index 0000000..542f970 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/BodyWrapper.cs new file mode 100644 index 0000000..64e12b6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/BodyWrapper.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class BodyWrapper : Model + { + private Owner owner; + private bool? notify; + private List relatedModules; + private Dictionary keyModified=new Dictionary(); + + public Owner Owner + { + /// The method to get the owner + /// Instance of Owner + get + { + return this.owner; + + } + /// The method to set the value to owner + /// Instance of Owner + set + { + this.owner=value; + + this.keyModified["owner"] = 1; + + } + } + + public bool? Notify + { + /// The method to get the notify + /// bool? representing the notify + get + { + return this.notify; + + } + /// The method to set the value to notify + /// bool? + set + { + this.notify=value; + + this.keyModified["notify"] = 1; + + } + } + + public List RelatedModules + { + /// The method to get the relatedModules + /// Instance of List + get + { + return this.relatedModules; + + } + /// The method to set the value to relatedModules + /// Instance of List + set + { + this.relatedModules=value; + + this.keyModified["related_modules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ChangeOwnerOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ChangeOwnerOperations.cs new file mode 100644 index 0000000..5269bbc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ChangeOwnerOperations.cs @@ -0,0 +1,87 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class ChangeOwnerOperations + { + private string module; + + /// /// Creates an instance of ChangeOwnerOperations with the given parameters + /// string + + public ChangeOwnerOperations(string module) + { + this.module=module; + + + } + + /// The method to single update + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse SingleUpdate(long? id, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/change_owner"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to mass update + /// Instance of MassWrapper + /// Instance of APIResponse + public APIResponse MassUpdate(MassWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/change_owner"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ErrorDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ErrorDetails.cs new file mode 100644 index 0000000..4a0fbe3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/ErrorDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class ErrorDetails : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/MassWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/MassWrapper.cs new file mode 100644 index 0000000..560c250 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/MassWrapper.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class MassWrapper : BodyWrapper , Model + { + private List ids; + private Owner owner; + private bool? notify; + private List relatedModules; + private Dictionary keyModified=new Dictionary(); + + public List Ids + { + /// The method to get the ids + /// Instance of List + get + { + return this.ids; + + } + /// The method to set the value to ids + /// Instance of List + set + { + this.ids=value; + + this.keyModified["ids"] = 1; + + } + } + + public Owner Owner + { + /// The method to get the owner + /// Instance of Owner + get + { + return this.owner; + + } + /// The method to set the value to owner + /// Instance of Owner + set + { + this.owner=value; + + this.keyModified["owner"] = 1; + + } + } + + public bool? Notify + { + /// The method to get the notify + /// bool? representing the notify + get + { + return this.notify; + + } + /// The method to set the value to notify + /// bool? + set + { + this.notify=value; + + this.keyModified["notify"] = 1; + + } + } + + public List RelatedModules + { + /// The method to get the relatedModules + /// Instance of List + get + { + return this.relatedModules; + + } + /// The method to set the value to relatedModules + /// Instance of List + set + { + this.relatedModules=value; + + this.keyModified["related_modules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/Owner.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/Owner.cs new file mode 100644 index 0000000..522ae84 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/Owner.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class Owner : Model + { + private long? id; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/RelatedModules.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/RelatedModules.cs new file mode 100644 index 0000000..a378993 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/RelatedModules.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class RelatedModules : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/SuccessResponse.cs new file mode 100644 index 0000000..f0f38c2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ChangeOwner/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ChangeOwner +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/APIException.cs new file mode 100644 index 0000000..ce57152 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionHandler.cs new file mode 100644 index 0000000..41b917a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionResponse.cs new file mode 100644 index 0000000..22d18f0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionWrapper.cs new file mode 100644 index 0000000..1105fbd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public class ActionWrapper : Model, ActionHandler + { + private List contactRoles; + private Dictionary keyModified=new Dictionary(); + + public List ContactRoles + { + /// The method to get the contactRoles + /// Instance of List + get + { + return this.contactRoles; + + } + /// The method to set the value to contactRoles + /// Instance of List + set + { + this.contactRoles=value; + + this.keyModified["contact_roles"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/BodyWrapper.cs new file mode 100644 index 0000000..e9ee5ad --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public class BodyWrapper : Model + { + private List contactRoles; + private Dictionary keyModified=new Dictionary(); + + public List ContactRoles + { + /// The method to get the contactRoles + /// Instance of List + get + { + return this.contactRoles; + + } + /// The method to set the value to contactRoles + /// Instance of List + set + { + this.contactRoles=value; + + this.keyModified["contact_roles"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ContactRole.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ContactRole.cs new file mode 100644 index 0000000..631223e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ContactRole.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public class ContactRole : Model + { + private long? id; + private string name; + private int? sequenceNumber; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ContactRolesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ContactRolesOperations.cs new file mode 100644 index 0000000..4afecde --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ContactRolesOperations.cs @@ -0,0 +1,194 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public class ContactRolesOperations + { + /// The method to get roles + /// Instance of APIResponse + public APIResponse GetRoles() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Contacts/roles"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create roles + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateRoles(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Contacts/roles"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update roles + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateRoles(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Contacts/roles"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete contact roles + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse DeleteContactRoles(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Contacts/roles"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get role + /// long? + /// Instance of APIResponse + public APIResponse GetRole(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Contacts/roles/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update contact role + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateContactRole(long? id, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Contacts/roles/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete contact role + /// long? + /// Instance of APIResponse + public APIResponse DeleteContactRole(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Contacts/roles/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class DeleteContactRolesParam + { + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.ContactRoles.DeleteContactRolesParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ResponseHandler.cs new file mode 100644 index 0000000..8ad25a9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ResponseWrapper.cs new file mode 100644 index 0000000..c1fc6db --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List contactRoles; + private Dictionary keyModified=new Dictionary(); + + public List ContactRoles + { + /// The method to get the contactRoles + /// Instance of List + get + { + return this.contactRoles; + + } + /// The method to set the value to contactRoles + /// Instance of List + set + { + this.contactRoles=value; + + this.keyModified["contact_roles"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/SuccessResponse.cs new file mode 100644 index 0000000..4731682 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ContactRoles/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ContactRoles +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/APIException.cs new file mode 100644 index 0000000..26c7c50 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public class APIException : Model, ResponseHandler + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ConversionOptionOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ConversionOptionOperations.cs new file mode 100644 index 0000000..87bbab8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ConversionOptionOperations.cs @@ -0,0 +1,51 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public class ConversionOptionOperations + { + private long? leadId; + + /// /// Creates an instance of ConversionOptionOperations with the given parameters + /// long? + + public ConversionOptionOperations(long? leadId) + { + this.leadId=leadId; + + + } + + /// The method to lead conversion options + /// Instance of APIResponse + public APIResponse LeadConversionOptions() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Leads/"); + + apiPath=string.Concat(apiPath, this.leadId.ToString()); + + apiPath=string.Concat(apiPath, "/__conversion_options"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.ModuleAPIName="Leads"; + + Utility.GetFields("Leads,Contacts,Deals,Accounts", handlerInstance); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ConversionOptions.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ConversionOptions.cs new file mode 100644 index 0000000..3d76f4d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ConversionOptions.cs @@ -0,0 +1,166 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public class ConversionOptions : Model + { + private Modules.Modules modulePreference; + private List contacts; + private List deals; + private List accounts; + private PreferenceFieldMatchedValue preferenceFieldMatchedValue; + private List modulesWithMultipleLayouts; + private Dictionary keyModified=new Dictionary(); + + public Modules.Modules ModulePreference + { + /// The method to get the modulePreference + /// Instance of Modules + get + { + return this.modulePreference; + + } + /// The method to set the value to modulePreference + /// Instance of Modules + set + { + this.modulePreference=value; + + this.keyModified["module_preference"] = 1; + + } + } + + public List Contacts + { + /// The method to get the contacts + /// Instance of List + get + { + return this.contacts; + + } + /// The method to set the value to contacts + /// Instance of List + set + { + this.contacts=value; + + this.keyModified["Contacts"] = 1; + + } + } + + public List Deals + { + /// The method to get the deals + /// Instance of List + get + { + return this.deals; + + } + /// The method to set the value to deals + /// Instance of List + set + { + this.deals=value; + + this.keyModified["Deals"] = 1; + + } + } + + public List Accounts + { + /// The method to get the accounts + /// Instance of List + get + { + return this.accounts; + + } + /// The method to set the value to accounts + /// Instance of List + set + { + this.accounts=value; + + this.keyModified["Accounts"] = 1; + + } + } + + public PreferenceFieldMatchedValue PreferenceFieldMatchedValue + { + /// The method to get the preferenceFieldMatchedValue + /// Instance of PreferenceFieldMatchedValue + get + { + return this.preferenceFieldMatchedValue; + + } + /// The method to set the value to preferenceFieldMatchedValue + /// Instance of PreferenceFieldMatchedValue + set + { + this.preferenceFieldMatchedValue=value; + + this.keyModified["preference_field_matched_value"] = 1; + + } + } + + public List ModulesWithMultipleLayouts + { + /// The method to get the modulesWithMultipleLayouts + /// Instance of List + get + { + return this.modulesWithMultipleLayouts; + + } + /// The method to set the value to modulesWithMultipleLayouts + /// Instance of List + set + { + this.modulesWithMultipleLayouts=value; + + this.keyModified["modules_with_multiple_layouts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/Field.cs new file mode 100644 index 0000000..40fdd5e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/Field.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public class Field : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/PreferenceFieldMatch.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/PreferenceFieldMatch.cs new file mode 100644 index 0000000..01c6aa7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/PreferenceFieldMatch.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public class PreferenceFieldMatch : Model + { + private Field field; + private string matchedLeadValue; + private Dictionary keyModified=new Dictionary(); + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public string MatchedLeadValue + { + /// The method to get the matchedLeadValue + /// string representing the matchedLeadValue + get + { + return this.matchedLeadValue; + + } + /// The method to set the value to matchedLeadValue + /// string + set + { + this.matchedLeadValue=value; + + this.keyModified["matched_lead_value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/PreferenceFieldMatchedValue.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/PreferenceFieldMatchedValue.cs new file mode 100644 index 0000000..e0557e0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/PreferenceFieldMatchedValue.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public class PreferenceFieldMatchedValue : Model + { + private List contacts; + private List accounts; + private List deals; + private Dictionary keyModified=new Dictionary(); + + public List Contacts + { + /// The method to get the contacts + /// Instance of List + get + { + return this.contacts; + + } + /// The method to set the value to contacts + /// Instance of List + set + { + this.contacts=value; + + this.keyModified["Contacts"] = 1; + + } + } + + public List Accounts + { + /// The method to get the accounts + /// Instance of List + get + { + return this.accounts; + + } + /// The method to set the value to accounts + /// Instance of List + set + { + this.accounts=value; + + this.keyModified["Accounts"] = 1; + + } + } + + public List Deals + { + /// The method to get the deals + /// Instance of List + get + { + return this.deals; + + } + /// The method to set the value to deals + /// Instance of List + set + { + this.deals=value; + + this.keyModified["Deals"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ResponseHandler.cs new file mode 100644 index 0000000..aee88aa --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ResponseWrapper.cs new file mode 100644 index 0000000..11b756b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConversionOption/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConversionOption +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private ConversionOptions conversionoptions; + private Dictionary keyModified=new Dictionary(); + + public ConversionOptions Conversionoptions + { + /// The method to get the conversionoptions + /// Instance of ConversionOptions + get + { + return this.conversionoptions; + + } + /// The method to set the value to conversionoptions + /// Instance of ConversionOptions + set + { + this.conversionoptions=value; + + this.keyModified["__conversion_options"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/APIException.cs new file mode 100644 index 0000000..345df28 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class APIException : Model, ActionHandler, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionHandler.cs new file mode 100644 index 0000000..733356a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionResponse.cs new file mode 100644 index 0000000..b1c65d1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionWrapper.cs new file mode 100644 index 0000000..bfb087d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/BodyWrapper.cs new file mode 100644 index 0000000..afefca9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class BodyWrapper : Model + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/CarryOverTags.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/CarryOverTags.cs new file mode 100644 index 0000000..4ad489e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/CarryOverTags.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class CarryOverTags : Model + { + private List contacts; + private List accounts; + private List deals; + private Dictionary keyModified=new Dictionary(); + + public List Contacts + { + /// The method to get the contacts + /// Instance of List + get + { + return this.contacts; + + } + /// The method to set the value to contacts + /// Instance of List + set + { + this.contacts=value; + + this.keyModified["Contacts"] = 1; + + } + } + + public List Accounts + { + /// The method to get the accounts + /// Instance of List + get + { + return this.accounts; + + } + /// The method to set the value to accounts + /// Instance of List + set + { + this.accounts=value; + + this.keyModified["Accounts"] = 1; + + } + } + + public List Deals + { + /// The method to get the deals + /// Instance of List + get + { + return this.deals; + + } + /// The method to set the value to deals + /// Instance of List + set + { + this.deals=value; + + this.keyModified["Deals"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ConvertLeadOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ConvertLeadOperations.cs new file mode 100644 index 0000000..b514f4d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/ConvertLeadOperations.cs @@ -0,0 +1,58 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class ConvertLeadOperations + { + private long? leadId; + + /// /// Creates an instance of ConvertLeadOperations with the given parameters + /// long? + + public ConvertLeadOperations(long? leadId) + { + this.leadId=leadId; + + + } + + /// The method to convert lead + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse ConvertLead(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Leads/"); + + apiPath=string.Concat(apiPath, this.leadId.ToString()); + + apiPath=string.Concat(apiPath, "/actions/convert"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.ModuleAPIName="Deals"; + + Utility.GetFields("Deals", handlerInstance); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/LeadConverter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/LeadConverter.cs new file mode 100644 index 0000000..3c3f7b5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/LeadConverter.cs @@ -0,0 +1,250 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class LeadConverter : Model + { + private bool? overwrite; + private bool? notifyLeadOwner; + private bool? notifyNewEntityOwner; + private MoveAttachmentsTo moveAttachmentsTo; + private Record.Record accounts; + private Record.Record contacts; + private Users.MinifiedUser assignTo; + private Record.Record deals; + private Choice addToExistingRecord; + private CarryOverTags carryOverTags; + private Dictionary keyModified=new Dictionary(); + + public bool? Overwrite + { + /// The method to get the overwrite + /// bool? representing the overwrite + get + { + return this.overwrite; + + } + /// The method to set the value to overwrite + /// bool? + set + { + this.overwrite=value; + + this.keyModified["overwrite"] = 1; + + } + } + + public bool? NotifyLeadOwner + { + /// The method to get the notifyLeadOwner + /// bool? representing the notifyLeadOwner + get + { + return this.notifyLeadOwner; + + } + /// The method to set the value to notifyLeadOwner + /// bool? + set + { + this.notifyLeadOwner=value; + + this.keyModified["notify_lead_owner"] = 1; + + } + } + + public bool? NotifyNewEntityOwner + { + /// The method to get the notifyNewEntityOwner + /// bool? representing the notifyNewEntityOwner + get + { + return this.notifyNewEntityOwner; + + } + /// The method to set the value to notifyNewEntityOwner + /// bool? + set + { + this.notifyNewEntityOwner=value; + + this.keyModified["notify_new_entity_owner"] = 1; + + } + } + + public MoveAttachmentsTo MoveAttachmentsTo + { + /// The method to get the moveAttachmentsTo + /// Instance of MoveAttachmentsTo + get + { + return this.moveAttachmentsTo; + + } + /// The method to set the value to moveAttachmentsTo + /// Instance of MoveAttachmentsTo + set + { + this.moveAttachmentsTo=value; + + this.keyModified["move_attachments_to"] = 1; + + } + } + + public Record.Record Accounts + { + /// The method to get the accounts + /// Instance of Record + get + { + return this.accounts; + + } + /// The method to set the value to accounts + /// Instance of Record + set + { + this.accounts=value; + + this.keyModified["Accounts"] = 1; + + } + } + + public Record.Record Contacts + { + /// The method to get the contacts + /// Instance of Record + get + { + return this.contacts; + + } + /// The method to set the value to contacts + /// Instance of Record + set + { + this.contacts=value; + + this.keyModified["Contacts"] = 1; + + } + } + + public Users.MinifiedUser AssignTo + { + /// The method to get the assignTo + /// Instance of MinifiedUser + get + { + return this.assignTo; + + } + /// The method to set the value to assignTo + /// Instance of MinifiedUser + set + { + this.assignTo=value; + + this.keyModified["assign_to"] = 1; + + } + } + + public Record.Record Deals + { + /// The method to get the deals + /// Instance of Record + get + { + return this.deals; + + } + /// The method to set the value to deals + /// Instance of Record + set + { + this.deals=value; + + this.keyModified["Deals"] = 1; + + } + } + + public Choice AddToExistingRecord + { + /// The method to get the addToExistingRecord + /// Instance of Choice + get + { + return this.addToExistingRecord; + + } + /// The method to set the value to addToExistingRecord + /// Instance of Choice + set + { + this.addToExistingRecord=value; + + this.keyModified["add_to_existing_record"] = 1; + + } + } + + public CarryOverTags CarryOverTags + { + /// The method to get the carryOverTags + /// Instance of CarryOverTags + get + { + return this.carryOverTags; + + } + /// The method to set the value to carryOverTags + /// Instance of CarryOverTags + set + { + this.carryOverTags=value; + + this.keyModified["carry_over_tags"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/MoveAttachmentsTo.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/MoveAttachmentsTo.cs new file mode 100644 index 0000000..76950d9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/MoveAttachmentsTo.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class MoveAttachmentsTo : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/SuccessResponse.cs new file mode 100644 index 0000000..69bb1fc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ConvertLead/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ConvertLead +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/APIException.cs new file mode 100644 index 0000000..3b59489 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Coql +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private Dictionary details; + private Choice message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/BodyWrapper.cs new file mode 100644 index 0000000..5eebb61 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Coql +{ + + public class BodyWrapper : Model + { + private string selectQuery; + private Dictionary keyModified=new Dictionary(); + + public string SelectQuery + { + /// The method to get the selectQuery + /// string representing the selectQuery + get + { + return this.selectQuery; + + } + /// The method to set the value to selectQuery + /// string + set + { + this.selectQuery=value; + + this.keyModified["select_query"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ClauseDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ClauseDetails.cs new file mode 100644 index 0000000..1c0505e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ClauseDetails.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Coql +{ + + public class ClauseDetails : Model, DetailsWrapper + { + private string clause; + private Dictionary keyModified=new Dictionary(); + + public string Clause + { + /// The method to get the clause + /// string representing the clause + get + { + return this.clause; + + } + /// The method to set the value to clause + /// string + set + { + this.clause=value; + + this.keyModified["clause"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/CoqlOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/CoqlOperations.cs new file mode 100644 index 0000000..a175198 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/CoqlOperations.cs @@ -0,0 +1,36 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Coql +{ + + public class CoqlOperations + { + /// The method to get records + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse GetRecords(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/coql"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/DetailsWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/DetailsWrapper.cs new file mode 100644 index 0000000..b64f210 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/DetailsWrapper.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Coql +{ + + public interface DetailsWrapper + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ParseErrorDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ParseErrorDetails.cs new file mode 100644 index 0000000..83abe17 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ParseErrorDetails.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Coql +{ + + public class ParseErrorDetails : Model, DetailsWrapper + { + private int? line; + private int? column; + private string near; + private Dictionary keyModified=new Dictionary(); + + public int? Line + { + /// The method to get the line + /// int? representing the line + get + { + return this.line; + + } + /// The method to set the value to line + /// int? + set + { + this.line=value; + + this.keyModified["line"] = 1; + + } + } + + public int? Column + { + /// The method to get the column + /// int? representing the column + get + { + return this.column; + + } + /// The method to set the value to column + /// int? + set + { + this.column=value; + + this.keyModified["column"] = 1; + + } + } + + public string Near + { + /// The method to get the near + /// string representing the near + get + { + return this.near; + + } + /// The method to set the value to near + /// string + set + { + this.near=value; + + this.keyModified["near"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ResponseHandler.cs new file mode 100644 index 0000000..fa375e8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Coql +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ResponseWrapper.cs new file mode 100644 index 0000000..311a8e6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Coql/ResponseWrapper.cs @@ -0,0 +1,81 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Coql +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Record.Info info; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public Record.Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/APIException.cs new file mode 100644 index 0000000..ba8f8e9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class APIException : Model, BaseCurrencyActionResponse, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionHandler.cs new file mode 100644 index 0000000..fe4e130 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Currencies +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionResponse.cs new file mode 100644 index 0000000..3941a8a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Currencies +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionWrapper.cs new file mode 100644 index 0000000..f85086c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class ActionWrapper : Model, ActionHandler + { + private List currencies; + private Dictionary keyModified=new Dictionary(); + + public List Currencies + { + /// The method to get the currencies + /// Instance of List + get + { + return this.currencies; + + } + /// The method to set the value to currencies + /// Instance of List + set + { + this.currencies=value; + + this.keyModified["currencies"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrency.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrency.cs new file mode 100644 index 0000000..8b825ef --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrency.cs @@ -0,0 +1,313 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class BaseCurrency : Model + { + private string isoCode; + private string symbol; + private DateTimeOffset? createdTime; + private bool? isActive; + private string exchangeRate; + private Format format; + private Users.MinifiedUser createdBy; + private bool? prefixSymbol; + private bool? isBase; + private DateTimeOffset? modifiedTime; + private string name; + private Users.MinifiedUser modifiedBy; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string IsoCode + { + /// The method to get the isoCode + /// string representing the isoCode + get + { + return this.isoCode; + + } + /// The method to set the value to isoCode + /// string + set + { + this.isoCode=value; + + this.keyModified["iso_code"] = 1; + + } + } + + public string Symbol + { + /// The method to get the symbol + /// string representing the symbol + get + { + return this.symbol; + + } + /// The method to set the value to symbol + /// string + set + { + this.symbol=value; + + this.keyModified["symbol"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public bool? IsActive + { + /// The method to get the isActive + /// bool? representing the isActive + get + { + return this.isActive; + + } + /// The method to set the value to isActive + /// bool? + set + { + this.isActive=value; + + this.keyModified["is_active"] = 1; + + } + } + + public string ExchangeRate + { + /// The method to get the exchangeRate + /// string representing the exchangeRate + get + { + return this.exchangeRate; + + } + /// The method to set the value to exchangeRate + /// string + set + { + this.exchangeRate=value; + + this.keyModified["exchange_rate"] = 1; + + } + } + + public Format Format + { + /// The method to get the format + /// Instance of Format + get + { + return this.format; + + } + /// The method to set the value to format + /// Instance of Format + set + { + this.format=value; + + this.keyModified["format"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public bool? PrefixSymbol + { + /// The method to get the prefixSymbol + /// bool? representing the prefixSymbol + get + { + return this.prefixSymbol; + + } + /// The method to set the value to prefixSymbol + /// bool? + set + { + this.prefixSymbol=value; + + this.keyModified["prefix_symbol"] = 1; + + } + } + + public bool? IsBase + { + /// The method to get the isBase + /// bool? representing the isBase + get + { + return this.isBase; + + } + /// The method to set the value to isBase + /// bool? + set + { + this.isBase=value; + + this.keyModified["is_base"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyActionResponse.cs new file mode 100644 index 0000000..bd74cf2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Currencies +{ + + public interface BaseCurrencyActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyActionWrapper.cs new file mode 100644 index 0000000..82ea424 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class BaseCurrencyActionWrapper : Model, ActionHandler + { + private BaseCurrencyActionResponse baseCurrency; + private Dictionary keyModified=new Dictionary(); + + public BaseCurrencyActionResponse BaseCurrency + { + /// The method to get the baseCurrency + /// Instance of BaseCurrencyActionResponse + get + { + return this.baseCurrency; + + } + /// The method to set the value to baseCurrency + /// Instance of BaseCurrencyActionResponse + set + { + this.baseCurrency=value; + + this.keyModified["base_currency"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyWrapper.cs new file mode 100644 index 0000000..c551c49 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BaseCurrencyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class BaseCurrencyWrapper : Model + { + private BaseCurrency baseCurrency; + private Dictionary keyModified=new Dictionary(); + + public BaseCurrency BaseCurrency + { + /// The method to get the baseCurrency + /// Instance of BaseCurrency + get + { + return this.baseCurrency; + + } + /// The method to set the value to baseCurrency + /// Instance of BaseCurrency + set + { + this.baseCurrency=value; + + this.keyModified["base_currency"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BodyWrapper.cs new file mode 100644 index 0000000..f3d7c55 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class BodyWrapper : Model + { + private List currencies; + private Dictionary keyModified=new Dictionary(); + + public List Currencies + { + /// The method to get the currencies + /// Instance of List + get + { + return this.currencies; + + } + /// The method to set the value to currencies + /// Instance of List + set + { + this.currencies=value; + + this.keyModified["currencies"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/CurrenciesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/CurrenciesOperations.cs new file mode 100644 index 0000000..0e9b72a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/CurrenciesOperations.cs @@ -0,0 +1,196 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class CurrenciesOperations + { + /// The method to get currencies + /// Instance of APIResponse + public APIResponse GetCurrencies() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to add currencies + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse AddCurrencies(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update currencies + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateCurrencies(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get currency + /// long? + /// Instance of APIResponse + public APIResponse GetCurrency(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update currency + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateCurrency(long? id, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to enable base currency + /// Instance of BaseCurrencyWrapper + /// Instance of APIResponse + public APIResponse EnableBaseCurrency(BaseCurrencyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies/actions/enable"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update base currency + /// Instance of BaseCurrencyWrapper + /// Instance of APIResponse + public APIResponse UpdateBaseCurrency(BaseCurrencyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/currencies/actions/enable"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/Currency.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/Currency.cs new file mode 100644 index 0000000..3779677 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/Currency.cs @@ -0,0 +1,313 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class Currency : Model + { + private string isoCode; + private string symbol; + private DateTimeOffset? createdTime; + private bool? isActive; + private string exchangeRate; + private Format format; + private Users.MinifiedUser createdBy; + private bool? prefixSymbol; + private bool? isBase; + private DateTimeOffset? modifiedTime; + private string name; + private Users.MinifiedUser modifiedBy; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string IsoCode + { + /// The method to get the isoCode + /// string representing the isoCode + get + { + return this.isoCode; + + } + /// The method to set the value to isoCode + /// string + set + { + this.isoCode=value; + + this.keyModified["iso_code"] = 1; + + } + } + + public string Symbol + { + /// The method to get the symbol + /// string representing the symbol + get + { + return this.symbol; + + } + /// The method to set the value to symbol + /// string + set + { + this.symbol=value; + + this.keyModified["symbol"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public bool? IsActive + { + /// The method to get the isActive + /// bool? representing the isActive + get + { + return this.isActive; + + } + /// The method to set the value to isActive + /// bool? + set + { + this.isActive=value; + + this.keyModified["is_active"] = 1; + + } + } + + public string ExchangeRate + { + /// The method to get the exchangeRate + /// string representing the exchangeRate + get + { + return this.exchangeRate; + + } + /// The method to set the value to exchangeRate + /// string + set + { + this.exchangeRate=value; + + this.keyModified["exchange_rate"] = 1; + + } + } + + public Format Format + { + /// The method to get the format + /// Instance of Format + get + { + return this.format; + + } + /// The method to set the value to format + /// Instance of Format + set + { + this.format=value; + + this.keyModified["format"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public bool? PrefixSymbol + { + /// The method to get the prefixSymbol + /// bool? representing the prefixSymbol + get + { + return this.prefixSymbol; + + } + /// The method to set the value to prefixSymbol + /// bool? + set + { + this.prefixSymbol=value; + + this.keyModified["prefix_symbol"] = 1; + + } + } + + public bool? IsBase + { + /// The method to get the isBase + /// bool? representing the isBase + get + { + return this.isBase; + + } + /// The method to set the value to isBase + /// bool? + set + { + this.isBase=value; + + this.keyModified["is_base"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ErrorDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ErrorDetails.cs new file mode 100644 index 0000000..ef8f82e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ErrorDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class ErrorDetails : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/Format.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/Format.cs new file mode 100644 index 0000000..90bd9af --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/Format.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class Format : Model + { + private Choice decimalSeparator; + private Choice thousandSeparator; + private Choice decimalPlaces; + private Dictionary keyModified=new Dictionary(); + + public Choice DecimalSeparator + { + /// The method to get the decimalSeparator + /// Instance of Choice + get + { + return this.decimalSeparator; + + } + /// The method to set the value to decimalSeparator + /// Instance of Choice + set + { + this.decimalSeparator=value; + + this.keyModified["decimal_separator"] = 1; + + } + } + + public Choice ThousandSeparator + { + /// The method to get the thousandSeparator + /// Instance of Choice + get + { + return this.thousandSeparator; + + } + /// The method to set the value to thousandSeparator + /// Instance of Choice + set + { + this.thousandSeparator=value; + + this.keyModified["thousand_separator"] = 1; + + } + } + + public Choice DecimalPlaces + { + /// The method to get the decimalPlaces + /// Instance of Choice + get + { + return this.decimalPlaces; + + } + /// The method to set the value to decimalPlaces + /// Instance of Choice + set + { + this.decimalPlaces=value; + + this.keyModified["decimal_places"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ResponseHandler.cs new file mode 100644 index 0000000..f1f6ea0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Currencies +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ResponseWrapper.cs new file mode 100644 index 0000000..1ddf311 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List currencies; + private Dictionary keyModified=new Dictionary(); + + public List Currencies + { + /// The method to get the currencies + /// Instance of List + get + { + return this.currencies; + + } + /// The method to set the value to currencies + /// Instance of List + set + { + this.currencies=value; + + this.keyModified["currencies"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/SuccessResponse.cs new file mode 100644 index 0000000..7d0adb5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Currencies/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Currencies +{ + + public class SuccessResponse : Model, ActionResponse, BaseCurrencyActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/APIException.cs new file mode 100644 index 0000000..2aa8c51 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionHandler.cs new file mode 100644 index 0000000..56ea52e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.CustomViews +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionResponse.cs new file mode 100644 index 0000000..ef83bcf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.CustomViews +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionWrapper.cs new file mode 100644 index 0000000..1d41ddd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class ActionWrapper : Model, ActionHandler + { + private List customViews; + private Dictionary keyModified=new Dictionary(); + + public List CustomViews + { + /// The method to get the customViews + /// Instance of List + get + { + return this.customViews; + + } + /// The method to set the value to customViews + /// Instance of List + set + { + this.customViews=value; + + this.keyModified["custom_views"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/BodyWrapper.cs new file mode 100644 index 0000000..eb9f3d5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class BodyWrapper : Model + { + private List customViews; + private Dictionary keyModified=new Dictionary(); + + public List CustomViews + { + /// The method to get the customViews + /// Instance of List + get + { + return this.customViews; + + } + /// The method to set the value to customViews + /// Instance of List + set + { + this.customViews=value; + + this.keyModified["custom_views"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Criteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Criteria.cs new file mode 100644 index 0000000..10f91cf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Criteria.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class Criteria : Model + { + private string comparator; + private Field field; + private object value; + private string groupOperator; + private List group; + private Dictionary keyModified=new Dictionary(); + + public string Comparator + { + /// The method to get the comparator + /// string representing the comparator + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// string + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + public string GroupOperator + { + /// The method to get the groupOperator + /// string representing the groupOperator + get + { + return this.groupOperator; + + } + /// The method to set the value to groupOperator + /// string + set + { + this.groupOperator=value; + + this.keyModified["group_operator"] = 1; + + } + } + + public List Group + { + /// The method to get the group + /// Instance of List + get + { + return this.group; + + } + /// The method to set the value to group + /// Instance of List + set + { + this.group=value; + + this.keyModified["group"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/CustomViews.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/CustomViews.cs new file mode 100644 index 0000000..23a62e0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/CustomViews.cs @@ -0,0 +1,501 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class CustomViews : Model + { + private string displayValue; + private string systemName; + private string category; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private DateTimeOffset? lastAccessedTime; + private string name; + private Owner createdBy; + private Owner modifiedBy; + private Owner module; + private Criteria criteria; + private bool? default1; + private bool? systemDefined; + private bool? locked; + private int? favorite; + private bool? offline; + private Choice accessType; + private List sharedTo; + private List fields; + private SortBy sortBy; + private Choice sortOrder; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public string SystemName + { + /// The method to get the systemName + /// string representing the systemName + get + { + return this.systemName; + + } + /// The method to set the value to systemName + /// string + set + { + this.systemName=value; + + this.keyModified["system_name"] = 1; + + } + } + + public string Category + { + /// The method to get the category + /// string representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// string + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public DateTimeOffset? LastAccessedTime + { + /// The method to get the lastAccessedTime + /// DateTimeOffset? representing the lastAccessedTime + get + { + return this.lastAccessedTime; + + } + /// The method to set the value to lastAccessedTime + /// DateTimeOffset? + set + { + this.lastAccessedTime=value; + + this.keyModified["last_accessed_time"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public Owner CreatedBy + { + /// The method to get the createdBy + /// Instance of Owner + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of Owner + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public Owner ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of Owner + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of Owner + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public Owner Module + { + /// The method to get the module + /// Instance of Owner + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Owner + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public Criteria Criteria + { + /// The method to get the criteria + /// Instance of Criteria + get + { + return this.criteria; + + } + /// The method to set the value to criteria + /// Instance of Criteria + set + { + this.criteria=value; + + this.keyModified["criteria"] = 1; + + } + } + + public bool? Default + { + /// The method to get the default + /// bool? representing the default1 + get + { + return this.default1; + + } + /// The method to set the value to default + /// bool? + set + { + this.default1=value; + + this.keyModified["default"] = 1; + + } + } + + public bool? SystemDefined + { + /// The method to get the systemDefined + /// bool? representing the systemDefined + get + { + return this.systemDefined; + + } + /// The method to set the value to systemDefined + /// bool? + set + { + this.systemDefined=value; + + this.keyModified["system_defined"] = 1; + + } + } + + public bool? Locked + { + /// The method to get the locked + /// bool? representing the locked + get + { + return this.locked; + + } + /// The method to set the value to locked + /// bool? + set + { + this.locked=value; + + this.keyModified["locked"] = 1; + + } + } + + public int? Favorite + { + /// The method to get the favorite + /// int? representing the favorite + get + { + return this.favorite; + + } + /// The method to set the value to favorite + /// int? + set + { + this.favorite=value; + + this.keyModified["favorite"] = 1; + + } + } + + public bool? Offline + { + /// The method to get the offline + /// bool? representing the offline + get + { + return this.offline; + + } + /// The method to set the value to offline + /// bool? + set + { + this.offline=value; + + this.keyModified["offline"] = 1; + + } + } + + public Choice AccessType + { + /// The method to get the accessType + /// Instance of Choice + get + { + return this.accessType; + + } + /// The method to set the value to accessType + /// Instance of Choice + set + { + this.accessType=value; + + this.keyModified["access_type"] = 1; + + } + } + + public List SharedTo + { + /// The method to get the sharedTo + /// Instance of List + get + { + return this.sharedTo; + + } + /// The method to set the value to sharedTo + /// Instance of List + set + { + this.sharedTo=value; + + this.keyModified["shared_to"] = 1; + + } + } + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public SortBy SortBy + { + /// The method to get the sortBy + /// Instance of SortBy + get + { + return this.sortBy; + + } + /// The method to set the value to sortBy + /// Instance of SortBy + set + { + this.sortBy=value; + + this.keyModified["sort_by"] = 1; + + } + } + + public Choice SortOrder + { + /// The method to get the sortOrder + /// Instance of Choice + get + { + return this.sortOrder; + + } + /// The method to set the value to sortOrder + /// Instance of Choice + set + { + this.sortOrder=value; + + this.keyModified["sort_order"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/CustomViewsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/CustomViewsOperations.cs new file mode 100644 index 0000000..4cb8a7a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/CustomViewsOperations.cs @@ -0,0 +1,152 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class CustomViewsOperations + { + /// The method to get custom views + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetCustomViews(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/custom_views"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get custom view + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetCustomView(long? id, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/custom_views/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to change sort order of custom views + /// Instance of BodyWrapper + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse ChangeSortOrderOfCustomViews(BodyWrapper request, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/custom_views/actions/change_sort"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to change sort order of custom view + /// long? + /// Instance of BodyWrapper + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse ChangeSortOrderOfCustomView(long? id, BodyWrapper request, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/custom_views/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/change_sort"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetCustomViewsParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.CustomViews.GetCustomViewsParam"); + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.CustomViews.GetCustomViewsParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.CustomViews.GetCustomViewsParam"); + } + + + public static class GetCustomViewParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.CustomViews.GetCustomViewParam"); + } + + + public static class ChangeSortOrderOfCustomViewsParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.CustomViews.ChangeSortOrderOfCustomViewsParam"); + } + + + public static class ChangeSortOrderOfCustomViewParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.CustomViews.ChangeSortOrderOfCustomViewParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Field.cs new file mode 100644 index 0000000..9b9636f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Field.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class Field : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Fields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Fields.cs new file mode 100644 index 0000000..6e4d00a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Fields.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class Fields : Model + { + private long? id; + private string apiName; + private bool? pin; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public bool? Pin + { + /// The method to get the pin + /// bool? representing the pin + get + { + return this.pin; + + } + /// The method to set the value to pin + /// bool? + set + { + this.pin=value; + + this.keyModified["_pin"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Info.cs new file mode 100644 index 0000000..a200a03 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Info.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class Info : Model + { + private int? perPage; + private int? count; + private int? page; + private bool? moreRecords; + private long? default1; + private Translation translation; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + public long? Default + { + /// The method to get the default + /// long? representing the default1 + get + { + return this.default1; + + } + /// The method to set the value to default + /// long? + set + { + this.default1=value; + + this.keyModified["default"] = 1; + + } + } + + public Translation Translation + { + /// The method to get the translation + /// Instance of Translation + get + { + return this.translation; + + } + /// The method to set the value to translation + /// Instance of Translation + set + { + this.translation=value; + + this.keyModified["translation"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Owner.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Owner.cs new file mode 100644 index 0000000..7381879 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Owner.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class Owner : Model + { + private string name; + private long? id; + private string email; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/PinFields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/PinFields.cs new file mode 100644 index 0000000..a97cd79 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/PinFields.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class PinFields : Model + { + private string apiName; + private bool? pin; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public bool? Pin + { + /// The method to get the pin + /// bool? representing the pin + get + { + return this.pin; + + } + /// The method to set the value to pin + /// bool? + set + { + this.pin=value; + + this.keyModified["_pin"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/PinUnpinFields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/PinUnpinFields.cs new file mode 100644 index 0000000..03e8d85 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/PinUnpinFields.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class PinUnpinFields : Model + { + private List fields; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ResponseHandler.cs new file mode 100644 index 0000000..478199d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.CustomViews +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ResponseWrapper.cs new file mode 100644 index 0000000..1d53f68 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List customViews; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List CustomViews + { + /// The method to get the customViews + /// Instance of List + get + { + return this.customViews; + + } + /// The method to set the value to customViews + /// Instance of List + set + { + this.customViews=value; + + this.keyModified["custom_views"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SharedTo.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SharedTo.cs new file mode 100644 index 0000000..31bfc4f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SharedTo.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class SharedTo : Model + { + private Choice type; + private string name; + private long? id; + private bool? subordinates; + private Dictionary keyModified=new Dictionary(); + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? Subordinates + { + /// The method to get the subordinates + /// bool? representing the subordinates + get + { + return this.subordinates; + + } + /// The method to set the value to subordinates + /// bool? + set + { + this.subordinates=value; + + this.keyModified["subordinates"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SortBy.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SortBy.cs new file mode 100644 index 0000000..4b1c5b2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SortBy.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class SortBy : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SuccessResponse.cs new file mode 100644 index 0000000..9f6c717 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Translation.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Translation.cs new file mode 100644 index 0000000..d802131 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/CustomViews/Translation.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.CustomViews +{ + + public class Translation : Model + { + private string publicViews; + private string otherUsersViews; + private string sharedWithMe; + private string createdByMe; + private Dictionary keyModified=new Dictionary(); + + public string PublicViews + { + /// The method to get the publicViews + /// string representing the publicViews + get + { + return this.publicViews; + + } + /// The method to set the value to publicViews + /// string + set + { + this.publicViews=value; + + this.keyModified["public_views"] = 1; + + } + } + + public string OtherUsersViews + { + /// The method to get the otherUsersViews + /// string representing the otherUsersViews + get + { + return this.otherUsersViews; + + } + /// The method to set the value to otherUsersViews + /// string + set + { + this.otherUsersViews=value; + + this.keyModified["other_users_views"] = 1; + + } + } + + public string SharedWithMe + { + /// The method to get the sharedWithMe + /// string representing the sharedWithMe + get + { + return this.sharedWithMe; + + } + /// The method to set the value to sharedWithMe + /// string + set + { + this.sharedWithMe=value; + + this.keyModified["shared_with_me"] = 1; + + } + } + + public string CreatedByMe + { + /// The method to get the createdByMe + /// string representing the createdByMe + get + { + return this.createdByMe; + + } + /// The method to set the value to createdByMe + /// string + set + { + this.createdByMe=value; + + this.keyModified["created_by_me"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/AUDataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/AUDataCenter.cs new file mode 100644 index 0000000..0a564ca --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/AUDataCenter.cs @@ -0,0 +1,41 @@ +using System; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// This class represents the properties of Zoho CRM in AU Domain. + /// + public class AUDataCenter : DataCenter + { + private static readonly AUDataCenter AU = new AUDataCenter(); + + private AUDataCenter() + { + } + + /// + /// This Environment class instance represents the Zoho CRM Production Environment in AU Domain. + /// + public static readonly Environment PRODUCTION = new Environment("https://www.zohoapis.com.au", AU.GetIAMUrl(), AU.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Sandbox Environment in AU Domain. + /// + public static readonly Environment SANDBOX = new Environment("https://sandbox.zohoapis.com.au", AU.GetIAMUrl(), AU.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Developer Environment in AU Domain. + /// + public static readonly Environment DEVELOPER = new Environment("https://developer.zohoapis.com.au", AU.GetIAMUrl(), AU.GetFileUploadUrl()); + + public override string GetIAMUrl() + { + return "https://accounts.zoho.com.au/oauth/v2/token"; + } + + public override string GetFileUploadUrl() + { + return "https://content.zohoapis.com.au"; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/CADataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/CADataCenter.cs new file mode 100644 index 0000000..a880285 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/CADataCenter.cs @@ -0,0 +1,42 @@ +using System; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// This class represents the properties of Zoho CRM in CA Domain. + /// + public class CADataCenter : DataCenter + { + private static readonly CADataCenter CA = new CADataCenter(); + + private CADataCenter() + { + } + + /// + /// This Environment class instance represents the Zoho CRM Production Environment in CA Domain. + /// + public static readonly Environment PRODUCTION = new Environment("https://www.zohoapis.ca", CA.GetIAMUrl(), CA.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Sandbox Environment in CA Domain. + /// + public static readonly Environment SANDBOX = new Environment("https://sandbox.zohoapis.ca", CA.GetIAMUrl(), CA.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Developer Environment in CA Domain. + /// + public static readonly Environment DEVELOPER = new Environment("https://developer.zohoapis.ca", CA.GetIAMUrl(), CA.GetFileUploadUrl()); + + public override string GetIAMUrl() + { + return "https://accounts.zoho.ca/oauth/v2/token"; + } + + public override string GetFileUploadUrl() + { + return "https://content.zohoapis.ca"; + } + } +} + diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/CNDataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/CNDataCenter.cs new file mode 100644 index 0000000..326b86b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/CNDataCenter.cs @@ -0,0 +1,41 @@ +using System; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// This class represents the properties of Zoho CRM in CN Domain. + /// + public class CNDataCenter : DataCenter + { + private static readonly CNDataCenter CN = new CNDataCenter(); + + private CNDataCenter() + { + } + + /// + /// This Environment class instance represents the Zoho CRM Production Environment in CN Domain. + /// + public static readonly Environment PRODUCTION = new Environment("https://www.zohoapis.com.cn", CN.GetIAMUrl(), CN.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Sandbox Environment in CN Domain. + /// + public static readonly Environment SANDBOX = new Environment("https://sandbox.zohoapis.com.cn", CN.GetIAMUrl(), CN.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Developer Environment in CN Domain. + /// + public static readonly Environment DEVELOPER = new Environment("https://developer.zohoapis.com.cn", CN.GetIAMUrl(), CN.GetFileUploadUrl()); + + public override string GetIAMUrl() + { + return "https://accounts.zoho.com.cn/oauth/v2/token"; + } + + public override string GetFileUploadUrl() + { + return "https://content.zohoapis.com.cn"; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/DataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/DataCenter.cs new file mode 100644 index 0000000..952f99e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/DataCenter.cs @@ -0,0 +1,158 @@ +using System.Linq; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// The abstract class represents the properties of Zoho CRM DataCenter. + /// + public abstract class DataCenter + { + /// + /// This method to get accounts URL. URL to be used when calling an OAuth accounts. + /// + /// A String representing the accounts URL. + public abstract string GetIAMUrl(); + + /// + /// This method to get File Upload URL. + /// + /// A String representing the FileUpload URL. + public abstract string GetFileUploadUrl(); + + /// + /// The abstract class represents the properties of Zoho CRM Environment. + /// + public class Environment + { + private string url; + + private string accountsUrl; + + private string fileUploadUrl; + + public Environment(string url, string accountsUrl, string fileUploadUrl) + { + this.accountsUrl = accountsUrl; + this.url = url; + this.fileUploadUrl = fileUploadUrl; + } + + /// + /// This method to get Zoho CRM API URL. + /// + /// A String representing the Zoho CRM API URL. + public string GetUrl() + { + return this.url; + } + + /// + /// This method to get Zoho CRM Accounts URL. + /// + /// A String representing the accounts URL. + public string GetAccountsUrl() + { + return this.accountsUrl; + } + + /// + /// This method to get Zoho CRM File Upload URL. + /// + /// A String representing the FileUpload URL. + public string GetFileUploadUrl() + { + return this.fileUploadUrl; + } + } + + public static Environment Get(string config) + { + if(Constants.US_DATACENTER.Any(a => a.Equals(config))) + { + if(config.Contains(Constants.SANDBOX)) + { + return USDataCenter.SANDBOX; + } + else if(config.Contains(Constants.DEVELOPER)) + { + return USDataCenter.DEVELOPER; + } + return USDataCenter.PRODUCTION; + } + if (Constants.JP_DATACENTER.Any(a=>a.Equals(config))) + { + if (config.Contains(Constants.SANDBOX)) + { + return JPDataCenter.SANDBOX; + } + else if (config.Contains(Constants.DEVELOPER)) + { + return JPDataCenter.DEVELOPER; + } + return JPDataCenter.PRODUCTION; + } + if (Constants.IN_DATACENTER.Any(a=>a.Equals(config))) + { + if (config.Contains(Constants.SANDBOX)) + { + return INDataCenter.SANDBOX; + } + else if (config.Contains(Constants.DEVELOPER)) + { + return INDataCenter.DEVELOPER; + } + return INDataCenter.PRODUCTION; + } + else if (Constants.EU_DATACENTER.Any(a=>a.Equals(config))) + { + if (config.Contains(Constants.SANDBOX)) + { + return EUDataCenter.SANDBOX; + } + else if (config.Contains(Constants.DEVELOPER)) + { + return EUDataCenter.DEVELOPER; + } + return EUDataCenter.PRODUCTION; + } + else if (Constants.CN_DATACENTER.Any(a=>a.Equals(config))) + { + if (config.Contains(Constants.SANDBOX)) + { + return CNDataCenter.SANDBOX; + } + else if (config.Contains(Constants.DEVELOPER)) + { + return CNDataCenter.DEVELOPER; + } + return CNDataCenter.PRODUCTION; + } + else if (Constants.AU_DATACENTER.Any(a=>a.Equals(config))) + { + if (config.Contains(Constants.SANDBOX)) + { + return AUDataCenter.SANDBOX; + } + else if (config.Contains(Constants.DEVELOPER)) + { + return AUDataCenter.DEVELOPER; + } + return AUDataCenter.PRODUCTION; + } + else if (Constants.CA_DATACENTER.Any(a => a.Equals(config))) + { + if (config.Contains(Constants.SANDBOX)) + { + return CADataCenter.SANDBOX; + } + else if (config.Contains(Constants.DEVELOPER)) + { + return CADataCenter.DEVELOPER; + } + return CADataCenter.PRODUCTION; + } + return null; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/EUDataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/EUDataCenter.cs new file mode 100644 index 0000000..8dfb5b1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/EUDataCenter.cs @@ -0,0 +1,41 @@ +using System; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// This class represents the properties of Zoho CRM in EU Domain. + /// + public class EUDataCenter : DataCenter + { + private static readonly EUDataCenter EU = new EUDataCenter(); + + private EUDataCenter() + { + } + + /// + /// This Environment class instance represents the Zoho CRM Production Environment in EU Domain. + /// + public static readonly Environment PRODUCTION = new Environment("https://www.zohoapis.eu", EU.GetIAMUrl(), EU.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Sandbox Environment in EU Domain. + /// + public static readonly Environment SANDBOX = new Environment("https://sandbox.zohoapis.eu", EU.GetIAMUrl(), EU.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Developer Environment in EU Domain. + /// + public static readonly Environment DEVELOPER = new Environment("https://developer.zohoapis.eu", EU.GetIAMUrl(), EU.GetFileUploadUrl()); + + public override string GetIAMUrl() + { + return "https://accounts.zoho.eu/oauth/v2/token"; + } + + public override string GetFileUploadUrl() + { + return "https://content.zohoapis.eu"; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/INDataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/INDataCenter.cs new file mode 100644 index 0000000..2b811c0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/INDataCenter.cs @@ -0,0 +1,41 @@ +using System; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// This class represents the properties of Zoho CRM in IN Domain. + /// + public class INDataCenter : DataCenter + { + private static readonly INDataCenter IN = new INDataCenter(); + + private INDataCenter() + { + } + + /// + /// This Environment class instance represents the Zoho CRM Production Environment in IN Domain. + /// + public static readonly Environment PRODUCTION = new Environment("https://www.zohoapis.in", IN.GetIAMUrl(), IN.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Sandbox Environment in IN Domain. + /// + public static readonly Environment SANDBOX = new Environment("https://sandbox.zohoapis.in", IN.GetIAMUrl(), IN.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Developer Environment in IN Domain. + /// + public static readonly Environment DEVELOPER = new Environment("https://developer.zohoapis.in", IN.GetIAMUrl(), IN.GetFileUploadUrl()); + + public override string GetIAMUrl() + { + return "https://accounts.zoho.in/oauth/v2/token"; + } + + public override string GetFileUploadUrl() + { + return "https://content.zohoapis.in"; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/JPDataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/JPDataCenter.cs new file mode 100644 index 0000000..0011036 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/JPDataCenter.cs @@ -0,0 +1,41 @@ +using System; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// This class represents the properties of Zoho CRM in Japan Domain. + /// + public class JPDataCenter : DataCenter + { + private static readonly JPDataCenter JP = new JPDataCenter(); + + private JPDataCenter() + { + } + + /// + /// This Environment class instance represents the Zoho CRM Production Environment in Japan Domain. + /// + public static readonly Environment PRODUCTION = new Environment("https://www.zohoapis.jp", JP.GetIAMUrl(), JP.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Sandbox Environment in Japan Domain. + /// + public static readonly Environment SANDBOX = new Environment("https://sandbox.zohoapis.jp", JP.GetIAMUrl(), JP.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Developer Environment in Japan Domain. + /// + public static readonly Environment DEVELOPER = new Environment("https://developer.zohoapis.jp", JP.GetIAMUrl(), JP.GetFileUploadUrl()); + + public override string GetIAMUrl() + { + return "https://accounts.zoho.jp/oauth/v2/token"; + } + + public override string GetFileUploadUrl() + { + return "https://content.zohoapis.jp"; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/USDataCenter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/USDataCenter.cs new file mode 100644 index 0000000..6c2f3ce --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Dc/USDataCenter.cs @@ -0,0 +1,41 @@ +using System; + +namespace Com.Zoho.Crm.API.Dc +{ + /// + /// This class represents the properties of Zoho CRM in US Domain. + /// + public class USDataCenter : DataCenter + { + private static readonly USDataCenter US = new USDataCenter(); + + private USDataCenter() + { + } + + /// + /// This Environment class instance represents the Zoho CRM Production Environment in US Domain. + /// + public static readonly Environment PRODUCTION = new Environment("https://www.zohoapis.com", US.GetIAMUrl(), US.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Sandbox Environment in US Domain. + /// + public static readonly Environment SANDBOX = new Environment("https://sandbox.zohoapis.com", US.GetIAMUrl(), US.GetFileUploadUrl()); + + /// + /// This Environment class instance represents the Zoho CRM Developer Environment in US Domain. + /// + public static readonly Environment DEVELOPER = new Environment("https://developer.zohoapis.com", US.GetIAMUrl(), US.GetFileUploadUrl()); + + public override string GetIAMUrl() + { + return "https://accounts.zoho.com/oauth/v2/token"; + } + + public override string GetFileUploadUrl() + { + return "https://content.zohoapis.com"; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/APIException.cs new file mode 100644 index 0000000..be20923 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionHandler.cs new file mode 100644 index 0000000..62f3ed6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionResponse.cs new file mode 100644 index 0000000..2392e41 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionWrapper.cs new file mode 100644 index 0000000..c821252 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/BodyWrapper.cs new file mode 100644 index 0000000..7cf63d0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class BodyWrapper : Model + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ContactRole.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ContactRole.cs new file mode 100644 index 0000000..4b1eb56 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ContactRole.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class ContactRole : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/Data.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/Data.cs new file mode 100644 index 0000000..153af28 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/Data.cs @@ -0,0 +1,208 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Tags; +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class Data : Record.Record , Model + { + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + if((( this.GetKeyValue("id")) != (null))) + { + return (long?) this.GetKeyValue("id"); + + } + return null; + + + } + /// The method to set the value to id + /// long? + set + { + this.AddKeyValue("id", value); + + } + } + + public ContactRole ContactRole + { + /// The method to get the contactRole + /// Instance of ContactRole + get + { + if((( this.GetKeyValue("Contact_Role")) != (null))) + { + return (ContactRole) this.GetKeyValue("Contact_Role"); + + } + return null; + + + } + /// The method to set the value to contactRole + /// Instance of ContactRole + set + { + this.AddKeyValue("Contact_Role", value); + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + if((( this.GetKeyValue("Created_By")) != (null))) + { + return (Users.MinifiedUser) this.GetKeyValue("Created_By"); + + } + return null; + + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.AddKeyValue("Created_By", value); + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + if((( this.GetKeyValue("Created_Time")) != (null))) + { + return (DateTimeOffset?) this.GetKeyValue("Created_Time"); + + } + return null; + + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.AddKeyValue("Created_Time", value); + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + if((( this.GetKeyValue("Modified_By")) != (null))) + { + return (Users.MinifiedUser) this.GetKeyValue("Modified_By"); + + } + return null; + + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.AddKeyValue("Modified_By", value); + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + if((( this.GetKeyValue("Modified_Time")) != (null))) + { + return (DateTimeOffset?) this.GetKeyValue("Modified_Time"); + + } + return null; + + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.AddKeyValue("Modified_Time", value); + + } + } + + public List Tag + { + /// The method to get the tag + /// Instance of List + get + { + if((( this.GetKeyValue("Tag")) != (null))) + { + return (List) this.GetKeyValue("Tag"); + + } + return null; + + + } + /// The method to set the value to tag + /// Instance of List + set + { + this.AddKeyValue("Tag", value); + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + if((( this.GetKeyValue("name")) != (null))) + { + return (string) this.GetKeyValue("name"); + + } + return null; + + + } + /// The method to set the value to name + /// string + set + { + this.AddKeyValue("name", value); + + } + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/DealContactRolesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/DealContactRolesOperations.cs new file mode 100644 index 0000000..64621ef --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/DealContactRolesOperations.cs @@ -0,0 +1,148 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class DealContactRolesOperations + { + /// The method to get associated contact roles + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetAssociatedContactRoles(long? deal, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Deals/"); + + apiPath=string.Concat(apiPath, deal.ToString()); + + apiPath=string.Concat(apiPath, "/Contact_Roles"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + handlerInstance.ModuleAPIName="Contacts"; + + Utility.GetFields("Contacts", handlerInstance); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get associated contact roles specific to contact + /// long? + /// long? + /// Instance of APIResponse + public APIResponse GetAssociatedContactRolesSpecificToContact(long? contact, long? deal) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Deals/"); + + apiPath=string.Concat(apiPath, deal.ToString()); + + apiPath=string.Concat(apiPath, "/Contact_Roles/"); + + apiPath=string.Concat(apiPath, contact.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.ModuleAPIName="Contacts"; + + Utility.GetFields("Contacts", handlerInstance); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to associate contact role to deal + /// long? + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse AssociateContactRoleToDeal(long? contact, long? deal, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Deals/"); + + apiPath=string.Concat(apiPath, deal.ToString()); + + apiPath=string.Concat(apiPath, "/Contact_Roles/"); + + apiPath=string.Concat(apiPath, contact.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete contact role realation + /// long? + /// long? + /// Instance of APIResponse + public APIResponse DeleteContactRoleRealation(long? contact, long? deal) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Deals/"); + + apiPath=string.Concat(apiPath, deal.ToString()); + + apiPath=string.Concat(apiPath, "/Contact_Roles/"); + + apiPath=string.Concat(apiPath, contact.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetAssociatedContactRolesParam + { + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.DealContactRoles.GetAssociatedContactRolesParam"); + public static readonly Param FIELDS=new Param("fields", "com.zoho.crm.api.DealContactRoles.GetAssociatedContactRolesParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ErrorDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ErrorDetails.cs new file mode 100644 index 0000000..f893270 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ErrorDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class ErrorDetails : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/Info.cs new file mode 100644 index 0000000..1d2c88f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/Info.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class Info : Model + { + private int? count; + private int? page; + private int? perPage; + private bool? moreRecords; + private string previousPageToken; + private string pageTokenExpiry; + private string nextPageToken; + private Dictionary keyModified=new Dictionary(); + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + public string PreviousPageToken + { + /// The method to get the previousPageToken + /// string representing the previousPageToken + get + { + return this.previousPageToken; + + } + /// The method to set the value to previousPageToken + /// string + set + { + this.previousPageToken=value; + + this.keyModified["previous_page_token"] = 1; + + } + } + + public string PageTokenExpiry + { + /// The method to get the pageTokenExpiry + /// string representing the pageTokenExpiry + get + { + return this.pageTokenExpiry; + + } + /// The method to set the value to pageTokenExpiry + /// string + set + { + this.pageTokenExpiry=value; + + this.keyModified["page_token_expiry"] = 1; + + } + } + + public string NextPageToken + { + /// The method to get the nextPageToken + /// string representing the nextPageToken + get + { + return this.nextPageToken; + + } + /// The method to set the value to nextPageToken + /// string + set + { + this.nextPageToken=value; + + this.keyModified["next_page_token"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ResponseHandler.cs new file mode 100644 index 0000000..9557a5b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ResponseWrapper.cs new file mode 100644 index 0000000..63f7a83 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/SuccessResponse.cs new file mode 100644 index 0000000..f9c0363 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DealContactRoles/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DealContactRoles +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/APIException.cs new file mode 100644 index 0000000..45fb2cf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Definition +{ + + public class APIException : Model + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/Definition.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/Definition.cs new file mode 100644 index 0000000..e6397f0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/Definition.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Definition +{ + + public class Definition : Model + { + private string rootElementName; + private Dictionary extradetails; + private List properties; + private Dictionary keyModified=new Dictionary(); + + public string RootElementName + { + /// The method to get the rootElementName + /// string representing the rootElementName + get + { + return this.rootElementName; + + } + /// The method to set the value to rootElementName + /// string + set + { + this.rootElementName=value; + + this.keyModified["root_element_name"] = 1; + + } + } + + public Dictionary Extradetails + { + /// The method to get the extradetails + /// Dictionary representing the extradetails + get + { + return this.extradetails; + + } + /// The method to set the value to extradetails + /// Dictionary + set + { + this.extradetails=value; + + this.keyModified["extraDetails"] = 1; + + } + } + + public List Properties + { + /// The method to get the properties + /// Instance of List + get + { + return this.properties; + + } + /// The method to set the value to properties + /// Instance of List + set + { + this.properties=value; + + this.keyModified["properties"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/MinifiedProperty.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/MinifiedProperty.cs new file mode 100644 index 0000000..7c2dc50 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/MinifiedProperty.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Definition +{ + + public class MinifiedProperty : Model + { + private bool? readOnly; + private string apiName; + private string dataType; + private int? length; + private bool? required; + private List properties; + private Dictionary keyModified=new Dictionary(); + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string DataType + { + /// The method to get the dataType + /// string representing the dataType + get + { + return this.dataType; + + } + /// The method to set the value to dataType + /// string + set + { + this.dataType=value; + + this.keyModified["data_type"] = 1; + + } + } + + public int? Length + { + /// The method to get the length + /// int? representing the length + get + { + return this.length; + + } + /// The method to set the value to length + /// int? + set + { + this.length=value; + + this.keyModified["length"] = 1; + + } + } + + public bool? Required + { + /// The method to get the required + /// bool? representing the required + get + { + return this.required; + + } + /// The method to set the value to required + /// bool? + set + { + this.required=value; + + this.keyModified["required"] = 1; + + } + } + + public List Properties + { + /// The method to get the properties + /// Instance of List + get + { + return this.properties; + + } + /// The method to set the value to properties + /// Instance of List + set + { + this.properties=value; + + this.keyModified["properties"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/MinifiedProperty1.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/MinifiedProperty1.cs new file mode 100644 index 0000000..48aa2b3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/MinifiedProperty1.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Definition +{ + + public class MinifiedProperty1 : Model + { + private bool? readOnly; + private string apiName; + private string dataType; + private int? length; + private bool? required; + private Dictionary keyModified=new Dictionary(); + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string DataType + { + /// The method to get the dataType + /// string representing the dataType + get + { + return this.dataType; + + } + /// The method to set the value to dataType + /// string + set + { + this.dataType=value; + + this.keyModified["data_type"] = 1; + + } + } + + public int? Length + { + /// The method to get the length + /// int? representing the length + get + { + return this.length; + + } + /// The method to set the value to length + /// int? + set + { + this.length=value; + + this.keyModified["length"] = 1; + + } + } + + public bool? Required + { + /// The method to get the required + /// bool? representing the required + get + { + return this.required; + + } + /// The method to set the value to required + /// bool? + set + { + this.required=value; + + this.keyModified["required"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/Property.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/Property.cs new file mode 100644 index 0000000..67f5e96 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/Property.cs @@ -0,0 +1,290 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Definition +{ + + public class Property : Model + { + private string displayLabel; + private List allowedValues; + private int? uiType; + private string regex; + private bool? readOnly; + private string apiName; + private string fieldLabel; + private string dataType; + private int? length; + private bool? availableInUserLayout; + private bool? required; + private List properties; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public List AllowedValues + { + /// The method to get the allowedValues + /// Instance of List + get + { + return this.allowedValues; + + } + /// The method to set the value to allowedValues + /// Instance of List + set + { + this.allowedValues=value; + + this.keyModified["allowed_values"] = 1; + + } + } + + public int? UiType + { + /// The method to get the uiType + /// int? representing the uiType + get + { + return this.uiType; + + } + /// The method to set the value to uiType + /// int? + set + { + this.uiType=value; + + this.keyModified["ui_type"] = 1; + + } + } + + public string Regex + { + /// The method to get the regex + /// string representing the regex + get + { + return this.regex; + + } + /// The method to set the value to regex + /// string + set + { + this.regex=value; + + this.keyModified["regex"] = 1; + + } + } + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string FieldLabel + { + /// The method to get the fieldLabel + /// string representing the fieldLabel + get + { + return this.fieldLabel; + + } + /// The method to set the value to fieldLabel + /// string + set + { + this.fieldLabel=value; + + this.keyModified["field_label"] = 1; + + } + } + + public string DataType + { + /// The method to get the dataType + /// string representing the dataType + get + { + return this.dataType; + + } + /// The method to set the value to dataType + /// string + set + { + this.dataType=value; + + this.keyModified["data_type"] = 1; + + } + } + + public int? Length + { + /// The method to get the length + /// int? representing the length + get + { + return this.length; + + } + /// The method to set the value to length + /// int? + set + { + this.length=value; + + this.keyModified["length"] = 1; + + } + } + + public bool? AvailableInUserLayout + { + /// The method to get the availableInUserLayout + /// bool? representing the availableInUserLayout + get + { + return this.availableInUserLayout; + + } + /// The method to set the value to availableInUserLayout + /// bool? + set + { + this.availableInUserLayout=value; + + this.keyModified["available_in_user_layout"] = 1; + + } + } + + public bool? Required + { + /// The method to get the required + /// bool? representing the required + get + { + return this.required; + + } + /// The method to set the value to required + /// bool? + set + { + this.required=value; + + this.keyModified["required"] = 1; + + } + } + + public List Properties + { + /// The method to get the properties + /// Instance of List + get + { + return this.properties; + + } + /// The method to set the value to properties + /// Instance of List + set + { + this.properties=value; + + this.keyModified["properties"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/ResponseWrapper.cs new file mode 100644 index 0000000..db9f965 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Definition/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Definition +{ + + public class ResponseWrapper : Model + { + private Definition definition; + private Dictionary keyModified=new Dictionary(); + + public Definition Definition + { + /// The method to get the definition + /// Instance of Definition + get + { + return this.definition; + + } + /// The method to set the value to definition + /// Instance of Definition + set + { + this.definition=value; + + this.keyModified["definition"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/APIException.cs new file mode 100644 index 0000000..0c38eb6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Digest +{ + + public class APIException : Model, ActionResponse, ActionHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionHandler.cs new file mode 100644 index 0000000..ea39e58 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Digest +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionResponse.cs new file mode 100644 index 0000000..d8a1446 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Digest +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionWrapper.cs new file mode 100644 index 0000000..2701d8b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Digest +{ + + public class ActionWrapper : Model, ActionHandler + { + private List digest; + private Dictionary keyModified=new Dictionary(); + + public List Digest + { + /// The method to get the digest + /// Instance of List + get + { + return this.digest; + + } + /// The method to set the value to digest + /// Instance of List + set + { + this.digest=value; + + this.keyModified["__digest"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/BodyWrapper.cs new file mode 100644 index 0000000..48d5a77 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Digest +{ + + public class BodyWrapper : Model + { + private List digest; + private Dictionary keyModified=new Dictionary(); + + public List Digest + { + /// The method to get the digest + /// Instance of List + get + { + return this.digest; + + } + /// The method to set the value to digest + /// Instance of List + set + { + this.digest=value; + + this.keyModified["__digest"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/Dependee.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/Dependee.cs new file mode 100644 index 0000000..e0f09e9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/Dependee.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Digest +{ + + public class Dependee : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/Digest.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/Digest.cs new file mode 100644 index 0000000..7a486c8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/Digest.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Digest +{ + + public class Digest : Model + { + private long? recordId; + private string type; + private string module; + private Dictionary keyModified=new Dictionary(); + + public long? RecordId + { + /// The method to get the recordId + /// long? representing the recordId + get + { + return this.recordId; + + } + /// The method to set the value to recordId + /// long? + set + { + this.recordId=value; + + this.keyModified["record_id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string Module + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/DigestOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/DigestOperations.cs new file mode 100644 index 0000000..8159cad --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/DigestOperations.cs @@ -0,0 +1,38 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Digest +{ + + public class DigestOperations + { + /// The method to create digest + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateDigest(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/__digest"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/SuccessResponse.cs new file mode 100644 index 0000000..497f426 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Digest/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Digest +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/APIException.cs new file mode 100644 index 0000000..57c517b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DownloadAttachments +{ + + public class APIException : Model, ResponseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/DownloadAttachmentsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/DownloadAttachmentsOperations.cs new file mode 100644 index 0000000..4dd98ca --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/DownloadAttachmentsOperations.cs @@ -0,0 +1,53 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.DownloadAttachments +{ + + public class DownloadAttachmentsOperations + { + /// The method to get download attachments details + /// long? + /// string + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetDownloadAttachmentsDetails(long? recordId, string module, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Emails/actions/download_attachments"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "multipart/form-data"); + + + } + + + public static class GetDownloadAttachmentsDetailsParam + { + public static readonly Param USER_ID=new Param("user_id", "com.zoho.crm.api.DownloadAttachments.GetDownloadAttachmentsDetailsParam"); + public static readonly Param MESSAGE_ID=new Param("message_id", "com.zoho.crm.api.DownloadAttachments.GetDownloadAttachmentsDetailsParam"); + public static readonly Param ID=new Param("id", "com.zoho.crm.api.DownloadAttachments.GetDownloadAttachmentsDetailsParam"); + public static readonly Param NAME=new Param("name", "com.zoho.crm.api.DownloadAttachments.GetDownloadAttachmentsDetailsParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/FileBodyWrapper.cs new file mode 100644 index 0000000..54d61d6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DownloadAttachments +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/ResponseHandler.cs new file mode 100644 index 0000000..d87ec6f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadAttachments/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DownloadAttachments +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/APIException.cs new file mode 100644 index 0000000..8175f30 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DownloadInlineImages +{ + + public class APIException : Model, ResponseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/DownloadInlineImagesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/DownloadInlineImagesOperations.cs new file mode 100644 index 0000000..dd792b7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/DownloadInlineImagesOperations.cs @@ -0,0 +1,52 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.DownloadInlineImages +{ + + public class DownloadInlineImagesOperations + { + /// The method to get download inline images + /// long? + /// string + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetDownloadInlineImages(long? recordId, string module, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Emails/actions/download_inline_images"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "multipart/form-data"); + + + } + + + public static class GetDownloadInlineImagesParam + { + public static readonly Param USER_ID=new Param("user_id", "com.zoho.crm.api.DownloadInlineImages.GetDownloadInlineImagesParam"); + public static readonly Param MESSAGE_ID=new Param("message_id", "com.zoho.crm.api.DownloadInlineImages.GetDownloadInlineImagesParam"); + public static readonly Param ID=new Param("id", "com.zoho.crm.api.DownloadInlineImages.GetDownloadInlineImagesParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/FileBodyWrapper.cs new file mode 100644 index 0000000..7c6ff50 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DownloadInlineImages +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/ResponseHandler.cs new file mode 100644 index 0000000..b29af4b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DownloadInlineImages/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DownloadInlineImages +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/APIException.cs new file mode 100644 index 0000000..cd84d57 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionHandler.cs new file mode 100644 index 0000000..b7a96e6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionResponse.cs new file mode 100644 index 0000000..e5c7a5d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionWrapper.cs new file mode 100644 index 0000000..a6a5ecd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class ActionWrapper : Model, ActionHandler + { + private ActionResponse duplicateCheckPreference; + private Dictionary keyModified=new Dictionary(); + + public ActionResponse DuplicateCheckPreference + { + /// The method to get the duplicateCheckPreference + /// Instance of ActionResponse + get + { + return this.duplicateCheckPreference; + + } + /// The method to set the value to duplicateCheckPreference + /// Instance of ActionResponse + set + { + this.duplicateCheckPreference=value; + + this.keyModified["duplicate_check_preference"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/BodyWrapper.cs new file mode 100644 index 0000000..1f6d03e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class BodyWrapper : Model + { + private DuplicateCheckPreference duplicateCheckPreference; + private Dictionary keyModified=new Dictionary(); + + public DuplicateCheckPreference DuplicateCheckPreference + { + /// The method to get the duplicateCheckPreference + /// Instance of DuplicateCheckPreference + get + { + return this.duplicateCheckPreference; + + } + /// The method to set the value to duplicateCheckPreference + /// Instance of DuplicateCheckPreference + set + { + this.duplicateCheckPreference=value; + + this.keyModified["duplicate_check_preference"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/CurrentField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/CurrentField.cs new file mode 100644 index 0000000..d8cae3d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/CurrentField.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class CurrentField : Model + { + private string id; + private string apiName; + private string name; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/DuplicateCheckPreference.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/DuplicateCheckPreference.cs new file mode 100644 index 0000000..c2753d9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/DuplicateCheckPreference.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class DuplicateCheckPreference : Model + { + private Choice type; + private List typeConfigurations; + private Dictionary keyModified=new Dictionary(); + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public List TypeConfigurations + { + /// The method to get the typeConfigurations + /// Instance of List + get + { + return this.typeConfigurations; + + } + /// The method to set the value to typeConfigurations + /// Instance of List + set + { + this.typeConfigurations=value; + + this.keyModified["type_configurations"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/DuplicateCheckPreferenceOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/DuplicateCheckPreferenceOperations.cs new file mode 100644 index 0000000..dc94ca8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/DuplicateCheckPreferenceOperations.cs @@ -0,0 +1,148 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class DuplicateCheckPreferenceOperations + { + private string module; + + /// /// Creates an instance of DuplicateCheckPreferenceOperations with the given parameters + /// string + + public DuplicateCheckPreferenceOperations(string module) + { + this.module=module; + + + } + + /// The method to get duplicate check preference + /// Instance of APIResponse + public APIResponse GetDuplicateCheckPreference() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/duplicate_check_preference"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.DuplicateCheckPreference.GetDuplicateCheckPreferenceParam"), this.module); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create duplicate check preference + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateDuplicateCheckPreference(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/duplicate_check_preference"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.DuplicateCheckPreference.CreateDuplicateCheckPreferenceParam"), this.module); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update duplicate check preference + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateDuplicateCheckPreference(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/duplicate_check_preference"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.DuplicateCheckPreference.UpdateDuplicateCheckPreferenceParam"), this.module); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete duplicate check preference + /// Instance of APIResponse + public APIResponse DeleteDuplicateCheckPreference() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/duplicate_check_preference"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.DuplicateCheckPreference.DeleteDuplicateCheckPreferenceParam"), this.module); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetDuplicateCheckPreferenceParam + { + } + + + public static class CreateDuplicateCheckPreferenceParam + { + } + + + public static class UpdateDuplicateCheckPreferenceParam + { + } + + + public static class DeleteDuplicateCheckPreferenceParam + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ExpectedFields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ExpectedFields.cs new file mode 100644 index 0000000..3e11a3c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ExpectedFields.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class ExpectedFields : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/FieldMappings.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/FieldMappings.cs new file mode 100644 index 0000000..e059220 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/FieldMappings.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class FieldMappings : Model + { + private CurrentField currentField; + private MappedField mappedField; + private Dictionary keyModified=new Dictionary(); + + public CurrentField CurrentField + { + /// The method to get the currentField + /// Instance of CurrentField + get + { + return this.currentField; + + } + /// The method to set the value to currentField + /// Instance of CurrentField + set + { + this.currentField=value; + + this.keyModified["current_field"] = 1; + + } + } + + public MappedField MappedField + { + /// The method to get the mappedField + /// Instance of MappedField + get + { + return this.mappedField; + + } + /// The method to set the value to mappedField + /// Instance of MappedField + set + { + this.mappedField=value; + + this.keyModified["mapped_field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/MappedField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/MappedField.cs new file mode 100644 index 0000000..4a6f01f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/MappedField.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class MappedField : Model + { + private string id; + private string apiName; + private string name; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/MappedModule.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/MappedModule.cs new file mode 100644 index 0000000..052ab94 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/MappedModule.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class MappedModule : Model + { + private string id; + private string apiName; + private string name; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ResponseHandler.cs new file mode 100644 index 0000000..667baa3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ResponseWrapper.cs new file mode 100644 index 0000000..c7bf7c1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private DuplicateCheckPreference duplicateCheckPreference; + private Dictionary keyModified=new Dictionary(); + + public DuplicateCheckPreference DuplicateCheckPreference + { + /// The method to get the duplicateCheckPreference + /// Instance of DuplicateCheckPreference + get + { + return this.duplicateCheckPreference; + + } + /// The method to set the value to duplicateCheckPreference + /// Instance of DuplicateCheckPreference + set + { + this.duplicateCheckPreference=value; + + this.keyModified["duplicate_check_preference"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/SuccessResponse.cs new file mode 100644 index 0000000..7f55ef9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Choice status; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/TypeConfiguration.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/TypeConfiguration.cs new file mode 100644 index 0000000..511e650 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/DuplicateCheckPreference/TypeConfiguration.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.DuplicateCheckPreference +{ + + public class TypeConfiguration : Model + { + private List fieldMappings; + private MappedModule mappedModule; + private Dictionary keyModified=new Dictionary(); + + public List FieldMappings + { + /// The method to get the fieldMappings + /// Instance of List + get + { + return this.fieldMappings; + + } + /// The method to set the value to fieldMappings + /// Instance of List + set + { + this.fieldMappings=value; + + this.keyModified["field_mappings"] = 1; + + } + } + + public MappedModule MappedModule + { + /// The method to get the mappedModule + /// Instance of MappedModule + get + { + return this.mappedModule; + + } + /// The method to set the value to mappedModule + /// Instance of MappedModule + set + { + this.mappedModule=value; + + this.keyModified["mapped_module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/Data.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/Data.cs new file mode 100644 index 0000000..7b351f2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/Data.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailComposeMeta +{ + + public class Data : Model + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data_1 + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/DataMap.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/DataMap.cs new file mode 100644 index 0000000..2532452 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/DataMap.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailComposeMeta +{ + + public class DataMap : Model + { + private User user; + private FeaturesAvailable featuresAvailable; + private List fromAddress; + private List relayDomains; + private string mergefieldsdata; + private Dictionary keyModified=new Dictionary(); + + public User User + { + /// The method to get the user + /// Instance of User + get + { + return this.user; + + } + /// The method to set the value to user + /// Instance of User + set + { + this.user=value; + + this.keyModified["user"] = 1; + + } + } + + public FeaturesAvailable FeaturesAvailable + { + /// The method to get the featuresAvailable + /// Instance of FeaturesAvailable + get + { + return this.featuresAvailable; + + } + /// The method to set the value to featuresAvailable + /// Instance of FeaturesAvailable + set + { + this.featuresAvailable=value; + + this.keyModified["features_available"] = 1; + + } + } + + public List FromAddress + { + /// The method to get the fromAddress + /// Instance of List + get + { + return this.fromAddress; + + } + /// The method to set the value to fromAddress + /// Instance of List + set + { + this.fromAddress=value; + + this.keyModified["from_address"] = 1; + + } + } + + public List RelayDomains + { + /// The method to get the relayDomains + /// Instance of List + get + { + return this.relayDomains; + + } + /// The method to set the value to relayDomains + /// Instance of List + set + { + this.relayDomains=value; + + this.keyModified["relay_domains"] = 1; + + } + } + + public string Mergefieldsdata + { + /// The method to get the mergefieldsdata + /// string representing the mergefieldsdata + get + { + return this.mergefieldsdata; + + } + /// The method to set the value to mergefieldsdata + /// string + set + { + this.mergefieldsdata=value; + + this.keyModified["mergeFieldsData"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/FeaturesAvailable.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/FeaturesAvailable.cs new file mode 100644 index 0000000..edbf085 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/FeaturesAvailable.cs @@ -0,0 +1,374 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailComposeMeta +{ + + public class FeaturesAvailable : Model + { + private Choice zsurveyEnabled; + private Choice inlineComposeWindow; + private Choice scheduleMail; + private Choice emailCloudPicker; + private Choice formIntegrationEnabled; + private Choice isprivacyenabled; + private Choice autoSuggestion; + private Choice unsubscribeLink; + private Choice bestTimeToContact; + private Choice attachTeamdrive; + private Choice islivedeskenabled; + private bool? subjectLineSuggestion; + private bool? emailPreference; + private bool? attachment; + private bool? mandateunsublink; + private bool? oldComposeRevert; + private Dictionary keyModified=new Dictionary(); + + public Choice ZsurveyEnabled + { + /// The method to get the zsurveyEnabled + /// Instance of Choice + get + { + return this.zsurveyEnabled; + + } + /// The method to set the value to zsurveyEnabled + /// Instance of Choice + set + { + this.zsurveyEnabled=value; + + this.keyModified["zsurvey_enabled"] = 1; + + } + } + + public Choice InlineComposeWindow + { + /// The method to get the inlineComposeWindow + /// Instance of Choice + get + { + return this.inlineComposeWindow; + + } + /// The method to set the value to inlineComposeWindow + /// Instance of Choice + set + { + this.inlineComposeWindow=value; + + this.keyModified["inline_compose_window"] = 1; + + } + } + + public Choice ScheduleMail + { + /// The method to get the scheduleMail + /// Instance of Choice + get + { + return this.scheduleMail; + + } + /// The method to set the value to scheduleMail + /// Instance of Choice + set + { + this.scheduleMail=value; + + this.keyModified["Schedule_Mail"] = 1; + + } + } + + public Choice EmailCloudPicker + { + /// The method to get the emailCloudPicker + /// Instance of Choice + get + { + return this.emailCloudPicker; + + } + /// The method to set the value to emailCloudPicker + /// Instance of Choice + set + { + this.emailCloudPicker=value; + + this.keyModified["EMAIL_CLOUD_PICKER"] = 1; + + } + } + + public Choice FormIntegrationEnabled + { + /// The method to get the formIntegrationEnabled + /// Instance of Choice + get + { + return this.formIntegrationEnabled; + + } + /// The method to set the value to formIntegrationEnabled + /// Instance of Choice + set + { + this.formIntegrationEnabled=value; + + this.keyModified["form_integration_enabled"] = 1; + + } + } + + public Choice Isprivacyenabled + { + /// The method to get the isprivacyenabled + /// Instance of Choice + get + { + return this.isprivacyenabled; + + } + /// The method to set the value to isprivacyenabled + /// Instance of Choice + set + { + this.isprivacyenabled=value; + + this.keyModified["isPrivacyEnabled"] = 1; + + } + } + + public Choice AutoSuggestion + { + /// The method to get the autoSuggestion + /// Instance of Choice + get + { + return this.autoSuggestion; + + } + /// The method to set the value to autoSuggestion + /// Instance of Choice + set + { + this.autoSuggestion=value; + + this.keyModified["auto_suggestion"] = 1; + + } + } + + public Choice UnsubscribeLink + { + /// The method to get the unsubscribeLink + /// Instance of Choice + get + { + return this.unsubscribeLink; + + } + /// The method to set the value to unsubscribeLink + /// Instance of Choice + set + { + this.unsubscribeLink=value; + + this.keyModified["UNSUBSCRIBE_LINK"] = 1; + + } + } + + public Choice BestTimeToContact + { + /// The method to get the bestTimeToContact + /// Instance of Choice + get + { + return this.bestTimeToContact; + + } + /// The method to set the value to bestTimeToContact + /// Instance of Choice + set + { + this.bestTimeToContact=value; + + this.keyModified["best_time_to_contact"] = 1; + + } + } + + public Choice AttachTeamdrive + { + /// The method to get the attachTeamdrive + /// Instance of Choice + get + { + return this.attachTeamdrive; + + } + /// The method to set the value to attachTeamdrive + /// Instance of Choice + set + { + this.attachTeamdrive=value; + + this.keyModified["attach_teamdrive"] = 1; + + } + } + + public Choice Islivedeskenabled + { + /// The method to get the islivedeskenabled + /// Instance of Choice + get + { + return this.islivedeskenabled; + + } + /// The method to set the value to islivedeskenabled + /// Instance of Choice + set + { + this.islivedeskenabled=value; + + this.keyModified["isLiveDeskEnabled"] = 1; + + } + } + + public bool? SubjectLineSuggestion + { + /// The method to get the subjectLineSuggestion + /// bool? representing the subjectLineSuggestion + get + { + return this.subjectLineSuggestion; + + } + /// The method to set the value to subjectLineSuggestion + /// bool? + set + { + this.subjectLineSuggestion=value; + + this.keyModified["subject_line_suggestion"] = 1; + + } + } + + public bool? EmailPreference + { + /// The method to get the emailPreference + /// bool? representing the emailPreference + get + { + return this.emailPreference; + + } + /// The method to set the value to emailPreference + /// bool? + set + { + this.emailPreference=value; + + this.keyModified["EMAIL_PREFERENCE"] = 1; + + } + } + + public bool? Attachment + { + /// The method to get the attachment + /// bool? representing the attachment + get + { + return this.attachment; + + } + /// The method to set the value to attachment + /// bool? + set + { + this.attachment=value; + + this.keyModified["ATTACHMENT"] = 1; + + } + } + + public bool? Mandateunsublink + { + /// The method to get the mandateunsublink + /// bool? representing the mandateunsublink + get + { + return this.mandateunsublink; + + } + /// The method to set the value to mandateunsublink + /// bool? + set + { + this.mandateunsublink=value; + + this.keyModified["mandateUnsubLink"] = 1; + + } + } + + public bool? OldComposeRevert + { + /// The method to get the oldComposeRevert + /// bool? representing the oldComposeRevert + get + { + return this.oldComposeRevert; + + } + /// The method to set the value to oldComposeRevert + /// bool? + set + { + this.oldComposeRevert=value; + + this.keyModified["OLD_COMPOSE_REVERT"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/FromAddress.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/FromAddress.cs new file mode 100644 index 0000000..25b7c40 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/FromAddress.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailComposeMeta +{ + + public class FromAddress : Model + { + private string userName; + private string type; + private string email; + private long? id; + private Choice default1; + private Dictionary keyModified=new Dictionary(); + + public string UserName + { + /// The method to get the userName + /// string representing the userName + get + { + return this.userName; + + } + /// The method to set the value to userName + /// string + set + { + this.userName=value; + + this.keyModified["user_name"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public Choice Default + { + /// The method to get the default + /// Instance of Choice + get + { + return this.default1; + + } + /// The method to set the value to default + /// Instance of Choice + set + { + this.default1=value; + + this.keyModified["default"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/Signature.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/Signature.cs new file mode 100644 index 0000000..77f2584 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/Signature.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailComposeMeta +{ + + public class Signature : Model + { + private int? mode; + private string sign; + private Dictionary keyModified=new Dictionary(); + + public int? Mode + { + /// The method to get the mode + /// int? representing the mode + get + { + return this.mode; + + } + /// The method to set the value to mode + /// int? + set + { + this.mode=value; + + this.keyModified["mode"] = 1; + + } + } + + public string Sign + { + /// The method to get the sign + /// string representing the sign + get + { + return this.sign; + + } + /// The method to set the value to sign + /// string + set + { + this.sign=value; + + this.keyModified["sign"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/User.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/User.cs new file mode 100644 index 0000000..2aa0ba1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailComposeMeta/User.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailComposeMeta +{ + + public class User : Model + { + private string fullName; + private string email; + private string zuid; + private string zgid; + private Signature signature; + private Dictionary keyModified=new Dictionary(); + + public string FullName + { + /// The method to get the fullName + /// string representing the fullName + get + { + return this.fullName; + + } + /// The method to set the value to fullName + /// string + set + { + this.fullName=value; + + this.keyModified["full_name"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + public string Zuid + { + /// The method to get the zuid + /// string representing the zuid + get + { + return this.zuid; + + } + /// The method to set the value to zuid + /// string + set + { + this.zuid=value; + + this.keyModified["zuid"] = 1; + + } + } + + public string Zgid + { + /// The method to get the zgid + /// string representing the zgid + get + { + return this.zgid; + + } + /// The method to set the value to zgid + /// string + set + { + this.zgid=value; + + this.keyModified["zgid"] = 1; + + } + } + + public Signature Signature + { + /// The method to get the signature + /// Instance of Signature + get + { + return this.signature; + + } + /// The method to set the value to signature + /// Instance of Signature + set + { + this.signature=value; + + this.keyModified["signature"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/APIException.cs new file mode 100644 index 0000000..f7d9a37 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class APIException : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ActionResponse.cs new file mode 100644 index 0000000..260e5f3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ActionWrapper.cs new file mode 100644 index 0000000..2f730e6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class ActionWrapper : Model + { + private List emaildrafts; + private Dictionary keyModified=new Dictionary(); + + public List Emaildrafts + { + /// The method to get the emaildrafts + /// Instance of List + get + { + return this.emaildrafts; + + } + /// The method to set the value to emaildrafts + /// Instance of List + set + { + this.emaildrafts=value; + + this.keyModified["__email_drafts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/Attachments.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/Attachments.cs new file mode 100644 index 0000000..c15a301 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/Attachments.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class Attachments : Model + { + private string serviceName; + private string fileSize; + private string id; + private string fileName; + private Dictionary keyModified=new Dictionary(); + + public string ServiceName + { + /// The method to get the serviceName + /// string representing the serviceName + get + { + return this.serviceName; + + } + /// The method to set the value to serviceName + /// string + set + { + this.serviceName=value; + + this.keyModified["service_name"] = 1; + + } + } + + public string FileSize + { + /// The method to get the fileSize + /// string representing the fileSize + get + { + return this.fileSize; + + } + /// The method to set the value to fileSize + /// string + set + { + this.fileSize=value; + + this.keyModified["file_size"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string FileName + { + /// The method to get the fileName + /// string representing the fileName + get + { + return this.fileName; + + } + /// The method to set the value to fileName + /// string + set + { + this.fileName=value; + + this.keyModified["file_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/BodyWrapper.cs new file mode 100644 index 0000000..e49117e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class BodyWrapper : Model + { + private List emaildrafts; + private Dictionary keyModified=new Dictionary(); + + public List Emaildrafts + { + /// The method to get the emaildrafts + /// Instance of List + get + { + return this.emaildrafts; + + } + /// The method to set the value to emaildrafts + /// Instance of List + set + { + this.emaildrafts=value; + + this.keyModified["__email_drafts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/EmailDrafts.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/EmailDrafts.cs new file mode 100644 index 0000000..e58c6e7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/EmailDrafts.cs @@ -0,0 +1,396 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class EmailDrafts : Model + { + private string id; + private DateTimeOffset? modifiedTime; + private DateTimeOffset? createdTime; + private string from; + private List to; + private string replyTo; + private List cc; + private List bcc; + private Template template; + private InventoryDetails inventoryDetails; + private List attachments; + private ScheduleDetails scheduleDetails; + private bool? richText; + private bool? emailOptOut; + private string subject; + private string content; + private string summary; + private Dictionary keyModified=new Dictionary(); + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public string From + { + /// The method to get the from + /// string representing the from + get + { + return this.from; + + } + /// The method to set the value to from + /// string + set + { + this.from=value; + + this.keyModified["from"] = 1; + + } + } + + public List To + { + /// The method to get the to + /// Instance of List + get + { + return this.to; + + } + /// The method to set the value to to + /// Instance of List + set + { + this.to=value; + + this.keyModified["to"] = 1; + + } + } + + public string ReplyTo + { + /// The method to get the replyTo + /// string representing the replyTo + get + { + return this.replyTo; + + } + /// The method to set the value to replyTo + /// string + set + { + this.replyTo=value; + + this.keyModified["reply_to"] = 1; + + } + } + + public List Cc + { + /// The method to get the cc + /// Instance of List + get + { + return this.cc; + + } + /// The method to set the value to cc + /// Instance of List + set + { + this.cc=value; + + this.keyModified["cc"] = 1; + + } + } + + public List Bcc + { + /// The method to get the bcc + /// Instance of List + get + { + return this.bcc; + + } + /// The method to set the value to bcc + /// Instance of List + set + { + this.bcc=value; + + this.keyModified["bcc"] = 1; + + } + } + + public Template Template + { + /// The method to get the template + /// Instance of Template + get + { + return this.template; + + } + /// The method to set the value to template + /// Instance of Template + set + { + this.template=value; + + this.keyModified["template"] = 1; + + } + } + + public InventoryDetails InventoryDetails + { + /// The method to get the inventoryDetails + /// Instance of InventoryDetails + get + { + return this.inventoryDetails; + + } + /// The method to set the value to inventoryDetails + /// Instance of InventoryDetails + set + { + this.inventoryDetails=value; + + this.keyModified["inventory_details"] = 1; + + } + } + + public List Attachments + { + /// The method to get the attachments + /// Instance of List + get + { + return this.attachments; + + } + /// The method to set the value to attachments + /// Instance of List + set + { + this.attachments=value; + + this.keyModified["attachments"] = 1; + + } + } + + public ScheduleDetails ScheduleDetails + { + /// The method to get the scheduleDetails + /// Instance of ScheduleDetails + get + { + return this.scheduleDetails; + + } + /// The method to set the value to scheduleDetails + /// Instance of ScheduleDetails + set + { + this.scheduleDetails=value; + + this.keyModified["schedule_details"] = 1; + + } + } + + public bool? RichText + { + /// The method to get the richText + /// bool? representing the richText + get + { + return this.richText; + + } + /// The method to set the value to richText + /// bool? + set + { + this.richText=value; + + this.keyModified["rich_text"] = 1; + + } + } + + public bool? EmailOptOut + { + /// The method to get the emailOptOut + /// bool? representing the emailOptOut + get + { + return this.emailOptOut; + + } + /// The method to set the value to emailOptOut + /// bool? + set + { + this.emailOptOut=value; + + this.keyModified["email_opt_out"] = 1; + + } + } + + public string Subject + { + /// The method to get the subject + /// string representing the subject + get + { + return this.subject; + + } + /// The method to set the value to subject + /// string + set + { + this.subject=value; + + this.keyModified["subject"] = 1; + + } + } + + public string Content + { + /// The method to get the content + /// string representing the content + get + { + return this.content; + + } + /// The method to set the value to content + /// string + set + { + this.content=value; + + this.keyModified["content"] = 1; + + } + } + + public string Summary + { + /// The method to get the summary + /// string representing the summary + get + { + return this.summary; + + } + /// The method to set the value to summary + /// string + set + { + this.summary=value; + + this.keyModified["summary"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/InventoryDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/InventoryDetails.cs new file mode 100644 index 0000000..6a70687 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/InventoryDetails.cs @@ -0,0 +1,123 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class InventoryDetails : Model + { + private InventoryTemplate inventoryTemplate; + private Record.Record record; + private string paperType; + private string viewType; + private Dictionary keyModified=new Dictionary(); + + public InventoryTemplate InventoryTemplate + { + /// The method to get the inventoryTemplate + /// Instance of InventoryTemplate + get + { + return this.inventoryTemplate; + + } + /// The method to set the value to inventoryTemplate + /// Instance of InventoryTemplate + set + { + this.inventoryTemplate=value; + + this.keyModified["inventory_template"] = 1; + + } + } + + public Record.Record Record + { + /// The method to get the record + /// Instance of Record + get + { + return this.record; + + } + /// The method to set the value to record + /// Instance of Record + set + { + this.record=value; + + this.keyModified["record"] = 1; + + } + } + + public string PaperType + { + /// The method to get the paperType + /// string representing the paperType + get + { + return this.paperType; + + } + /// The method to set the value to paperType + /// string + set + { + this.paperType=value; + + this.keyModified["paper_type"] = 1; + + } + } + + public string ViewType + { + /// The method to get the viewType + /// string representing the viewType + get + { + return this.viewType; + + } + /// The method to set the value to viewType + /// string + set + { + this.viewType=value; + + this.keyModified["view_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/InventoryTemplate.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/InventoryTemplate.cs new file mode 100644 index 0000000..96cc6b6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/InventoryTemplate.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class InventoryTemplate : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ResponseWrapper.cs new file mode 100644 index 0000000..03a6c01 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class ResponseWrapper : Model + { + private List emaildrafts; + private Dictionary keyModified=new Dictionary(); + + public List Emaildrafts + { + /// The method to get the emaildrafts + /// Instance of List + get + { + return this.emaildrafts; + + } + /// The method to set the value to emaildrafts + /// Instance of List + set + { + this.emaildrafts=value; + + this.keyModified["__email_drafts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ScheduleDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ScheduleDetails.cs new file mode 100644 index 0000000..e5ed875 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/ScheduleDetails.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class ScheduleDetails : Model + { + private DateTimeOffset? time; + private TimeZoneInfo timezone; + private string source; + private Dictionary keyModified=new Dictionary(); + + public DateTimeOffset? Time + { + /// The method to get the time + /// DateTimeOffset? representing the time + get + { + return this.time; + + } + /// The method to set the value to time + /// DateTimeOffset? + set + { + this.time=value; + + this.keyModified["time"] = 1; + + } + } + + public TimeZoneInfo Timezone + { + /// The method to get the timezone + /// TimeZoneInfo representing the timezone + get + { + return this.timezone; + + } + /// The method to set the value to timezone + /// TimeZoneInfo + set + { + this.timezone=value; + + this.keyModified["timezone"] = 1; + + } + } + + public string Source + { + /// The method to get the source + /// string representing the source + get + { + return this.source; + + } + /// The method to set the value to source + /// string + set + { + this.source=value; + + this.keyModified["source"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/SuccessResponse.cs new file mode 100644 index 0000000..fed71b1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/Template.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/Template.cs new file mode 100644 index 0000000..b814ca7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/Template.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class Template : Model + { + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/To.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/To.cs new file mode 100644 index 0000000..07beaea --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailDrafts/To.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailDrafts +{ + + public class To : Model + { + private string userName; + private string email; + private Dictionary keyModified=new Dictionary(); + + public string UserName + { + /// The method to get the userName + /// string representing the userName + get + { + return this.userName; + + } + /// The method to set the value to userName + /// string + set + { + this.userName=value; + + this.keyModified["user_name"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/APIException.cs new file mode 100644 index 0000000..280aea7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private string message; + private Dictionary details; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Attachments.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Attachments.cs new file mode 100644 index 0000000..fa3dbc4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Attachments.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class Attachments : Model + { + private string size; + private string name; + private string id; + private Dictionary keyModified=new Dictionary(); + + public string Size + { + /// The method to get the size + /// string representing the size + get + { + return this.size; + + } + /// The method to set the value to size + /// string + set + { + this.size=value; + + this.keyModified["size"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Criteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Criteria.cs new file mode 100644 index 0000000..90c59a0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Criteria.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class Criteria : Model + { + private Choice comparator; + private Field field; + private string value; + private Dictionary keyModified=new Dictionary(); + + public Choice Comparator + { + /// The method to get the comparator + /// Instance of Choice + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// Instance of Choice + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Email.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Email.cs new file mode 100644 index 0000000..91e835b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Email.cs @@ -0,0 +1,586 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class Email : Model + { + private List attachments; + private long? threadId; + private List cc; + private string summary; + private Users.MinifiedUser owner; + private bool? read; + private string content; + private bool? sent; + private string subject; + private object activityInfo; + private Choice intent; + private Choice sentimentInfo; + private string messageId; + private string source; + private LinkedRecord linkedRecord; + private string sentTime; + private string emotion; + private UserDetails from; + private List to; + private DateTimeOffset? time; + private List status; + private bool? hasAttachment; + private bool? hasThreadAttachment; + private bool? editable; + private string mailFormat; + private UserDetails replyTo; + private Dictionary keyModified=new Dictionary(); + + public List Attachments + { + /// The method to get the attachments + /// Instance of List + get + { + return this.attachments; + + } + /// The method to set the value to attachments + /// Instance of List + set + { + this.attachments=value; + + this.keyModified["attachments"] = 1; + + } + } + + public long? ThreadId + { + /// The method to get the threadId + /// long? representing the threadId + get + { + return this.threadId; + + } + /// The method to set the value to threadId + /// long? + set + { + this.threadId=value; + + this.keyModified["thread_id"] = 1; + + } + } + + public List Cc + { + /// The method to get the cc + /// Instance of List + get + { + return this.cc; + + } + /// The method to set the value to cc + /// Instance of List + set + { + this.cc=value; + + this.keyModified["cc"] = 1; + + } + } + + public string Summary + { + /// The method to get the summary + /// string representing the summary + get + { + return this.summary; + + } + /// The method to set the value to summary + /// string + set + { + this.summary=value; + + this.keyModified["summary"] = 1; + + } + } + + public Users.MinifiedUser Owner + { + /// The method to get the owner + /// Instance of MinifiedUser + get + { + return this.owner; + + } + /// The method to set the value to owner + /// Instance of MinifiedUser + set + { + this.owner=value; + + this.keyModified["owner"] = 1; + + } + } + + public bool? Read + { + /// The method to get the read + /// bool? representing the read + get + { + return this.read; + + } + /// The method to set the value to read + /// bool? + set + { + this.read=value; + + this.keyModified[Constants.REQUEST_CATEGORY_READ] = 1; + + } + } + + public string Content + { + /// The method to get the content + /// string representing the content + get + { + return this.content; + + } + /// The method to set the value to content + /// string + set + { + this.content=value; + + this.keyModified["content"] = 1; + + } + } + + public bool? Sent + { + /// The method to get the sent + /// bool? representing the sent + get + { + return this.sent; + + } + /// The method to set the value to sent + /// bool? + set + { + this.sent=value; + + this.keyModified["sent"] = 1; + + } + } + + public string Subject + { + /// The method to get the subject + /// string representing the subject + get + { + return this.subject; + + } + /// The method to set the value to subject + /// string + set + { + this.subject=value; + + this.keyModified["subject"] = 1; + + } + } + + public object ActivityInfo + { + /// The method to get the activityInfo + /// object representing the activityInfo + get + { + return this.activityInfo; + + } + /// The method to set the value to activityInfo + /// object + set + { + this.activityInfo=value; + + this.keyModified["activity_info"] = 1; + + } + } + + public Choice Intent + { + /// The method to get the intent + /// Instance of Choice + get + { + return this.intent; + + } + /// The method to set the value to intent + /// Instance of Choice + set + { + this.intent=value; + + this.keyModified["intent"] = 1; + + } + } + + public Choice SentimentInfo + { + /// The method to get the sentimentInfo + /// Instance of Choice + get + { + return this.sentimentInfo; + + } + /// The method to set the value to sentimentInfo + /// Instance of Choice + set + { + this.sentimentInfo=value; + + this.keyModified["sentiment_info"] = 1; + + } + } + + public string MessageId + { + /// The method to get the messageId + /// string representing the messageId + get + { + return this.messageId; + + } + /// The method to set the value to messageId + /// string + set + { + this.messageId=value; + + this.keyModified["message_id"] = 1; + + } + } + + public string Source + { + /// The method to get the source + /// string representing the source + get + { + return this.source; + + } + /// The method to set the value to source + /// string + set + { + this.source=value; + + this.keyModified["source"] = 1; + + } + } + + public LinkedRecord LinkedRecord + { + /// The method to get the linkedRecord + /// Instance of LinkedRecord + get + { + return this.linkedRecord; + + } + /// The method to set the value to linkedRecord + /// Instance of LinkedRecord + set + { + this.linkedRecord=value; + + this.keyModified["linked_record"] = 1; + + } + } + + public string SentTime + { + /// The method to get the sentTime + /// string representing the sentTime + get + { + return this.sentTime; + + } + /// The method to set the value to sentTime + /// string + set + { + this.sentTime=value; + + this.keyModified["sent_time"] = 1; + + } + } + + public string Emotion + { + /// The method to get the emotion + /// string representing the emotion + get + { + return this.emotion; + + } + /// The method to set the value to emotion + /// string + set + { + this.emotion=value; + + this.keyModified["emotion"] = 1; + + } + } + + public UserDetails From + { + /// The method to get the from + /// Instance of UserDetails + get + { + return this.from; + + } + /// The method to set the value to from + /// Instance of UserDetails + set + { + this.from=value; + + this.keyModified["from"] = 1; + + } + } + + public List To + { + /// The method to get the to + /// Instance of List + get + { + return this.to; + + } + /// The method to set the value to to + /// Instance of List + set + { + this.to=value; + + this.keyModified["to"] = 1; + + } + } + + public DateTimeOffset? Time + { + /// The method to get the time + /// DateTimeOffset? representing the time + get + { + return this.time; + + } + /// The method to set the value to time + /// DateTimeOffset? + set + { + this.time=value; + + this.keyModified["time"] = 1; + + } + } + + public List Status + { + /// The method to get the status + /// Instance of List + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of List + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public bool? HasAttachment + { + /// The method to get the hasAttachment + /// bool? representing the hasAttachment + get + { + return this.hasAttachment; + + } + /// The method to set the value to hasAttachment + /// bool? + set + { + this.hasAttachment=value; + + this.keyModified["has_attachment"] = 1; + + } + } + + public bool? HasThreadAttachment + { + /// The method to get the hasThreadAttachment + /// bool? representing the hasThreadAttachment + get + { + return this.hasThreadAttachment; + + } + /// The method to set the value to hasThreadAttachment + /// bool? + set + { + this.hasThreadAttachment=value; + + this.keyModified["has_thread_attachment"] = 1; + + } + } + + public bool? Editable + { + /// The method to get the editable + /// bool? representing the editable + get + { + return this.editable; + + } + /// The method to set the value to editable + /// bool? + set + { + this.editable=value; + + this.keyModified["editable"] = 1; + + } + } + + public string MailFormat + { + /// The method to get the mailFormat + /// string representing the mailFormat + get + { + return this.mailFormat; + + } + /// The method to set the value to mailFormat + /// string + set + { + this.mailFormat=value; + + this.keyModified["mail_format"] = 1; + + } + } + + public UserDetails ReplyTo + { + /// The method to get the replyTo + /// Instance of UserDetails + get + { + return this.replyTo; + + } + /// The method to set the value to replyTo + /// Instance of UserDetails + set + { + this.replyTo=value; + + this.keyModified["reply_to"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/EmailRelatedRecordsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/EmailRelatedRecordsOperations.cs new file mode 100644 index 0000000..b32fe1b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/EmailRelatedRecordsOperations.cs @@ -0,0 +1,118 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class EmailRelatedRecordsOperations + { + private string moduleName; + private long? recordId; + private string type; + private long? ownerId; + + /// /// Creates an instance of EmailRelatedRecordsOperations with the given parameters + /// long? + /// string + /// string + /// long? + + public EmailRelatedRecordsOperations(long? recordId, string moduleName, string type, long? ownerId) + { + this.recordId=recordId; + + this.moduleName=moduleName; + + this.type=type; + + this.ownerId=ownerId; + + + } + + /// The method to get emails related records + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetEmailsRelatedRecords(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.moduleName.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Emails"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("type", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordsParam"), this.type); + + handlerInstance.AddParam(new Param("owner_id", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordsParam"), this.ownerId); + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get emails related record + /// string + /// Instance of APIResponse + public APIResponse GetEmailsRelatedRecord(string messageId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.moduleName.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.recordId.ToString()); + + apiPath=string.Concat(apiPath, "/Emails/"); + + apiPath=string.Concat(apiPath, messageId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("type", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordParam"), this.type); + + handlerInstance.AddParam(new Param("owner_id", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordParam"), this.ownerId); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetEmailsRelatedRecordsParam + { + public static readonly Param FILTER=new Param("filter", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordsParam"); + public static readonly Param INDEX=new Param("index", "com.zoho.crm.api.EmailRelatedRecords.GetEmailsRelatedRecordsParam"); + } + + + public static class GetEmailsRelatedRecordParam + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Field.cs new file mode 100644 index 0000000..6df8b3a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Field.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class Field : Model + { + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Info.cs new file mode 100644 index 0000000..636a6a5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Info.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class Info : Model + { + private int? count; + private string nextIndex; + private string prevIndex; + private int? perPage; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public string NextIndex + { + /// The method to get the nextIndex + /// string representing the nextIndex + get + { + return this.nextIndex; + + } + /// The method to set the value to nextIndex + /// string + set + { + this.nextIndex=value; + + this.keyModified["next_index"] = 1; + + } + } + + public string PrevIndex + { + /// The method to get the prevIndex + /// string representing the prevIndex + get + { + return this.prevIndex; + + } + /// The method to set the value to prevIndex + /// string + set + { + this.prevIndex=value; + + this.keyModified["prev_index"] = 1; + + } + } + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/LinkedRecord.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/LinkedRecord.cs new file mode 100644 index 0000000..a741c69 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/LinkedRecord.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class LinkedRecord : Model + { + private long? id; + private string name; + private Module module; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Module.cs new file mode 100644 index 0000000..c6deea6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class Module : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/ResponseHandler.cs new file mode 100644 index 0000000..7140af8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/ResponseWrapper.cs new file mode 100644 index 0000000..39a67cf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List emails; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Emails + { + /// The method to get the emails + /// Instance of List + get + { + return this.emails; + + } + /// The method to set the value to emails + /// Instance of List + set + { + this.emails=value; + + this.keyModified["Emails"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Status.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Status.cs new file mode 100644 index 0000000..ab79668 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/Status.cs @@ -0,0 +1,207 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class Status : Model + { + private DateTimeOffset? firstOpen; + private string count; + private string type; + private DateTimeOffset? lastOpen; + private DateTimeOffset? bouncedTime; + private string bouncedReason; + private string category; + private string subCategory; + private Dictionary keyModified=new Dictionary(); + + public DateTimeOffset? FirstOpen + { + /// The method to get the firstOpen + /// DateTimeOffset? representing the firstOpen + get + { + return this.firstOpen; + + } + /// The method to set the value to firstOpen + /// DateTimeOffset? + set + { + this.firstOpen=value; + + this.keyModified["first_open"] = 1; + + } + } + + public string Count + { + /// The method to get the count + /// string representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// string + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public DateTimeOffset? LastOpen + { + /// The method to get the lastOpen + /// DateTimeOffset? representing the lastOpen + get + { + return this.lastOpen; + + } + /// The method to set the value to lastOpen + /// DateTimeOffset? + set + { + this.lastOpen=value; + + this.keyModified["last_open"] = 1; + + } + } + + public DateTimeOffset? BouncedTime + { + /// The method to get the bouncedTime + /// DateTimeOffset? representing the bouncedTime + get + { + return this.bouncedTime; + + } + /// The method to set the value to bouncedTime + /// DateTimeOffset? + set + { + this.bouncedTime=value; + + this.keyModified["bounced_time"] = 1; + + } + } + + public string BouncedReason + { + /// The method to get the bouncedReason + /// string representing the bouncedReason + get + { + return this.bouncedReason; + + } + /// The method to set the value to bouncedReason + /// string + set + { + this.bouncedReason=value; + + this.keyModified["bounced_reason"] = 1; + + } + } + + public string Category + { + /// The method to get the category + /// string representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// string + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public string SubCategory + { + /// The method to get the subCategory + /// string representing the subCategory + get + { + return this.subCategory; + + } + /// The method to set the value to subCategory + /// string + set + { + this.subCategory=value; + + this.keyModified["sub_category"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/UserDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/UserDetails.cs new file mode 100644 index 0000000..bc3ad7e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailRelatedRecords/UserDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailRelatedRecords +{ + + public class UserDetails : Model + { + private string userName; + private string email; + private Dictionary keyModified=new Dictionary(); + + public string UserName + { + /// The method to get the userName + /// string representing the userName + get + { + return this.userName; + + } + /// The method to set the value to userName + /// string + set + { + this.userName=value; + + this.keyModified["user_name"] = 1; + + } + } + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/APIException.cs new file mode 100644 index 0000000..70ed80c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailSharingDetails +{ + + public class APIException : Model, ResponseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/EmailSharingDetailsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/EmailSharingDetailsOperations.cs new file mode 100644 index 0000000..88a7e33 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/EmailSharingDetailsOperations.cs @@ -0,0 +1,55 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.EmailSharingDetails +{ + + public class EmailSharingDetailsOperations + { + private string module; + private long? recordId; + + /// /// Creates an instance of EmailSharingDetailsOperations with the given parameters + /// long? + /// string + + public EmailSharingDetailsOperations(long? recordId, string module) + { + this.recordId=recordId; + + this.module=module; + + + } + + /// The method to get email sharing details + /// Instance of APIResponse + public APIResponse GetEmailSharingDetails() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.recordId.ToString()); + + apiPath=string.Concat(apiPath, "/__emails_sharing_details"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/EmailSharings.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/EmailSharings.cs new file mode 100644 index 0000000..98bf1e9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/EmailSharings.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailSharingDetails +{ + + public class EmailSharings : Model + { + private List shareFromUsers; + private List availableTypes; + private Dictionary keyModified=new Dictionary(); + + public List ShareFromUsers + { + /// The method to get the shareFromUsers + /// Instance of List + get + { + return this.shareFromUsers; + + } + /// The method to set the value to shareFromUsers + /// Instance of List + set + { + this.shareFromUsers=value; + + this.keyModified["share_from_users"] = 1; + + } + } + + public List AvailableTypes + { + /// The method to get the availableTypes + /// Instance of List + get + { + return this.availableTypes; + + } + /// The method to set the value to availableTypes + /// Instance of List + set + { + this.availableTypes=value; + + this.keyModified["available_types"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ResponseHandler.cs new file mode 100644 index 0000000..488d34c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.EmailSharingDetails +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ResponseWrapper.cs new file mode 100644 index 0000000..8de8727 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailSharingDetails +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List emailssharingdetails; + private Dictionary keyModified=new Dictionary(); + + public List Emailssharingdetails + { + /// The method to get the emailssharingdetails + /// Instance of List + get + { + return this.emailssharingdetails; + + } + /// The method to set the value to emailssharingdetails + /// Instance of List + set + { + this.emailssharingdetails=value; + + this.keyModified["__emails_sharing_details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ShareFromUser.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ShareFromUser.cs new file mode 100644 index 0000000..210a708 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailSharingDetails/ShareFromUser.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailSharingDetails +{ + + public class ShareFromUser : Model + { + private string name; + private string type; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["_type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/APIException.cs new file mode 100644 index 0000000..589727b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/Attachment.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/Attachment.cs new file mode 100644 index 0000000..9e4acbe --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/Attachment.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public class Attachment : Model + { + private long? size; + private string fileName; + private string fileId; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public long? Size + { + /// The method to get the size + /// long? representing the size + get + { + return this.size; + + } + /// The method to set the value to size + /// long? + set + { + this.size=value; + + this.keyModified["size"] = 1; + + } + } + + public string FileName + { + /// The method to get the fileName + /// string representing the fileName + get + { + return this.fileName; + + } + /// The method to set the value to fileName + /// string + set + { + this.fileName=value; + + this.keyModified["file_name"] = 1; + + } + } + + public string FileId + { + /// The method to get the fileId + /// string representing the fileId + get + { + return this.fileId; + + } + /// The method to set the value to fileId + /// string + set + { + this.fileId=value; + + this.keyModified["file_id"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/EmailTemplate.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/EmailTemplate.cs new file mode 100644 index 0000000..0e3de24 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/EmailTemplate.cs @@ -0,0 +1,482 @@ +using Com.Zoho.Crm.API.InventoryTemplates; +using Com.Zoho.Crm.API.SendMail; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public class EmailTemplate : InventoryTemplates.InventoryTemplates , Model, Template + { + private List attachments; + private string subject; + private bool? associated; + private bool? consentLinked; + private string description; + private LastVersionStatistics lastVersionStatistics; + private string category; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private DateTimeOffset? lastUsageTime; + private InventoryTemplates.Folder folder; + private InventoryTemplates.ModuleMap module; + private InventoryTemplates.User createdBy; + private InventoryTemplates.User modifiedBy; + private string name; + private long? id; + private string editorMode; + private bool? favorite; + private string content; + private bool? active; + private string mailContent; + private Dictionary keyModified=new Dictionary(); + + public List Attachments + { + /// The method to get the attachments + /// Instance of List + get + { + return this.attachments; + + } + /// The method to set the value to attachments + /// Instance of List + set + { + this.attachments=value; + + this.keyModified["attachments"] = 1; + + } + } + + public string Subject + { + /// The method to get the subject + /// string representing the subject + get + { + return this.subject; + + } + /// The method to set the value to subject + /// string + set + { + this.subject=value; + + this.keyModified["subject"] = 1; + + } + } + + public bool? Associated + { + /// The method to get the associated + /// bool? representing the associated + get + { + return this.associated; + + } + /// The method to set the value to associated + /// bool? + set + { + this.associated=value; + + this.keyModified["associated"] = 1; + + } + } + + public bool? ConsentLinked + { + /// The method to get the consentLinked + /// bool? representing the consentLinked + get + { + return this.consentLinked; + + } + /// The method to set the value to consentLinked + /// bool? + set + { + this.consentLinked=value; + + this.keyModified["consent_linked"] = 1; + + } + } + + public string Description + { + /// The method to get the description + /// string representing the description + get + { + return this.description; + + } + /// The method to set the value to description + /// string + set + { + this.description=value; + + this.keyModified["description"] = 1; + + } + } + + public LastVersionStatistics LastVersionStatistics + { + /// The method to get the lastVersionStatistics + /// Instance of LastVersionStatistics + get + { + return this.lastVersionStatistics; + + } + /// The method to set the value to lastVersionStatistics + /// Instance of LastVersionStatistics + set + { + this.lastVersionStatistics=value; + + this.keyModified["last_version_statistics"] = 1; + + } + } + + public string Category + { + /// The method to get the category + /// string representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// string + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public DateTimeOffset? LastUsageTime + { + /// The method to get the lastUsageTime + /// DateTimeOffset? representing the lastUsageTime + get + { + return this.lastUsageTime; + + } + /// The method to set the value to lastUsageTime + /// DateTimeOffset? + set + { + this.lastUsageTime=value; + + this.keyModified["last_usage_time"] = 1; + + } + } + + public InventoryTemplates.Folder Folder + { + /// The method to get the folder + /// Instance of Folder + get + { + return this.folder; + + } + /// The method to set the value to folder + /// Instance of Folder + set + { + this.folder=value; + + this.keyModified["folder"] = 1; + + } + } + + public InventoryTemplates.ModuleMap Module + { + /// The method to get the module + /// Instance of ModuleMap + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of ModuleMap + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public InventoryTemplates.User CreatedBy + { + /// The method to get the createdBy + /// Instance of User + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of User + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public InventoryTemplates.User ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of User + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of User + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string EditorMode + { + /// The method to get the editorMode + /// string representing the editorMode + get + { + return this.editorMode; + + } + /// The method to set the value to editorMode + /// string + set + { + this.editorMode=value; + + this.keyModified["editor_mode"] = 1; + + } + } + + public bool? Favorite + { + /// The method to get the favorite + /// bool? representing the favorite + get + { + return this.favorite; + + } + /// The method to set the value to favorite + /// bool? + set + { + this.favorite=value; + + this.keyModified["favorite"] = 1; + + } + } + + public string Content + { + /// The method to get the content + /// string representing the content + get + { + return this.content; + + } + /// The method to set the value to content + /// string + set + { + this.content=value; + + this.keyModified["content"] = 1; + + } + } + + public bool? Active + { + /// The method to get the active + /// bool? representing the active + get + { + return this.active; + + } + /// The method to set the value to active + /// bool? + set + { + this.active=value; + + this.keyModified["active"] = 1; + + } + } + + public string MailContent + { + /// The method to get the mailContent + /// string representing the mailContent + get + { + return this.mailContent; + + } + /// The method to set the value to mailContent + /// string + set + { + this.mailContent=value; + + this.keyModified["mail_content"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/EmailTemplatesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/EmailTemplatesOperations.cs new file mode 100644 index 0000000..3206ede --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/EmailTemplatesOperations.cs @@ -0,0 +1,64 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public class EmailTemplatesOperations + { + /// The method to get email templates + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetEmailTemplates(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/email_templates"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get email template + /// long? + /// Instance of APIResponse + public APIResponse GetEmailTemplate(long? template) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/email_templates/"); + + apiPath=string.Concat(apiPath, template.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetEmailTemplatesParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.EmailTemplates.GetEmailTemplatesParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/Info.cs new file mode 100644 index 0000000..62bdc7f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public class Info : Model + { + private int? perPage; + private int? page; + private int? count; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/LastVersionStatistics.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/LastVersionStatistics.cs new file mode 100644 index 0000000..c3fd55b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/LastVersionStatistics.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public class LastVersionStatistics : Model + { + private int? tracked; + private int? delivered; + private int? opened; + private int? bounced; + private int? sent; + private int? clicked; + private Dictionary keyModified=new Dictionary(); + + public int? Tracked + { + /// The method to get the tracked + /// int? representing the tracked + get + { + return this.tracked; + + } + /// The method to set the value to tracked + /// int? + set + { + this.tracked=value; + + this.keyModified["tracked"] = 1; + + } + } + + public int? Delivered + { + /// The method to get the delivered + /// int? representing the delivered + get + { + return this.delivered; + + } + /// The method to set the value to delivered + /// int? + set + { + this.delivered=value; + + this.keyModified["delivered"] = 1; + + } + } + + public int? Opened + { + /// The method to get the opened + /// int? representing the opened + get + { + return this.opened; + + } + /// The method to set the value to opened + /// int? + set + { + this.opened=value; + + this.keyModified["opened"] = 1; + + } + } + + public int? Bounced + { + /// The method to get the bounced + /// int? representing the bounced + get + { + return this.bounced; + + } + /// The method to set the value to bounced + /// int? + set + { + this.bounced=value; + + this.keyModified["bounced"] = 1; + + } + } + + public int? Sent + { + /// The method to get the sent + /// int? representing the sent + get + { + return this.sent; + + } + /// The method to set the value to sent + /// int? + set + { + this.sent=value; + + this.keyModified["sent"] = 1; + + } + } + + public int? Clicked + { + /// The method to get the clicked + /// int? representing the clicked + get + { + return this.clicked; + + } + /// The method to set the value to clicked + /// int? + set + { + this.clicked=value; + + this.keyModified["clicked"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/ResponseHandler.cs new file mode 100644 index 0000000..f692b4a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/ResponseWrapper.cs new file mode 100644 index 0000000..97ab95c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EmailTemplates/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EmailTemplates +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List emailTemplates; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List EmailTemplates + { + /// The method to get the emailTemplates + /// Instance of List + get + { + return this.emailTemplates; + + } + /// The method to set the value to emailTemplates + /// Instance of List + set + { + this.emailTemplates=value; + + this.keyModified["email_templates"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/APIException.cs new file mode 100644 index 0000000..09cd04f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class APIException : Model, ResponseHandler + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Entity.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Entity.cs new file mode 100644 index 0000000..71abea3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Entity.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class Entity : Model + { + private string name; + private long? id; + private Module module; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/EntityScores.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/EntityScores.cs new file mode 100644 index 0000000..ebde026 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/EntityScores.cs @@ -0,0 +1,269 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class EntityScores : Model + { + private Entity entity; + private int? positiveScore; + private int? touchPointScore; + private int? score; + private int? negativeScore; + private int? touchPointNegativeScore; + private ScoringRule scoringRule; + private List fieldStates; + private long? id; + private bool? ziaVisions; + private int? touchPointPositiveScore; + private Dictionary keyModified=new Dictionary(); + + public Entity Entity + { + /// The method to get the entity + /// Instance of Entity + get + { + return this.entity; + + } + /// The method to set the value to entity + /// Instance of Entity + set + { + this.entity=value; + + this.keyModified["Entity"] = 1; + + } + } + + public int? PositiveScore + { + /// The method to get the positiveScore + /// int? representing the positiveScore + get + { + return this.positiveScore; + + } + /// The method to set the value to positiveScore + /// int? + set + { + this.positiveScore=value; + + this.keyModified["Positive_Score"] = 1; + + } + } + + public int? TouchPointScore + { + /// The method to get the touchPointScore + /// int? representing the touchPointScore + get + { + return this.touchPointScore; + + } + /// The method to set the value to touchPointScore + /// int? + set + { + this.touchPointScore=value; + + this.keyModified["Touch_Point_Score"] = 1; + + } + } + + public int? Score + { + /// The method to get the score + /// int? representing the score + get + { + return this.score; + + } + /// The method to set the value to score + /// int? + set + { + this.score=value; + + this.keyModified["Score"] = 1; + + } + } + + public int? NegativeScore + { + /// The method to get the negativeScore + /// int? representing the negativeScore + get + { + return this.negativeScore; + + } + /// The method to set the value to negativeScore + /// int? + set + { + this.negativeScore=value; + + this.keyModified["Negative_Score"] = 1; + + } + } + + public int? TouchPointNegativeScore + { + /// The method to get the touchPointNegativeScore + /// int? representing the touchPointNegativeScore + get + { + return this.touchPointNegativeScore; + + } + /// The method to set the value to touchPointNegativeScore + /// int? + set + { + this.touchPointNegativeScore=value; + + this.keyModified["Touch_Point_Negative_Score"] = 1; + + } + } + + public ScoringRule ScoringRule + { + /// The method to get the scoringRule + /// Instance of ScoringRule + get + { + return this.scoringRule; + + } + /// The method to set the value to scoringRule + /// Instance of ScoringRule + set + { + this.scoringRule=value; + + this.keyModified["Scoring_Rule"] = 1; + + } + } + + public List FieldStates + { + /// The method to get the fieldStates + /// Instance of List + get + { + return this.fieldStates; + + } + /// The method to set the value to fieldStates + /// Instance of List + set + { + this.fieldStates=value; + + this.keyModified["$field_states"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? ZiaVisions + { + /// The method to get the ziaVisions + /// bool? representing the ziaVisions + get + { + return this.ziaVisions; + + } + /// The method to set the value to ziaVisions + /// bool? + set + { + this.ziaVisions=value; + + this.keyModified["$zia_visions"] = 1; + + } + } + + public int? TouchPointPositiveScore + { + /// The method to get the touchPointPositiveScore + /// int? representing the touchPointPositiveScore + get + { + return this.touchPointPositiveScore; + + } + /// The method to set the value to touchPointPositiveScore + /// int? + set + { + this.touchPointPositiveScore=value; + + this.keyModified["Touch_Point_Positive_Score"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/EntityScoresOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/EntityScoresOperations.cs new file mode 100644 index 0000000..9333a88 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/EntityScoresOperations.cs @@ -0,0 +1,108 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; +using System; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class EntityScoresOperations + { + private string fields; + private string cvid; + + /// /// Creates an instance of EntityScoresOperations with the given parameters + /// string + /// string + + public EntityScoresOperations(string fields, string cvid) + { + this.fields=fields; + + this.cvid=cvid; + + + } + + /// The method to get entity score + /// long? + /// Instance of APIResponse + public APIResponse GetEntityScore(long? recordId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Entity_Scores__s/"); + + apiPath=string.Concat(apiPath, recordId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("fields", "com.zoho.crm.api.EntityScores.GetEntityScoreParam"), this.fields); + + handlerInstance.AddParam(new Param("cvid", "com.zoho.crm.api.EntityScores.GetEntityScoreParam"), this.cvid); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get entity scores + /// Instance of ParameterMap + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse GetEntityScores(ParameterMap paramInstance, HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Entity_Scores__s"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("fields", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"), this.fields); + + handlerInstance.AddParam(new Param("cvid", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"), this.cvid); + + handlerInstance.Param=paramInstance; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetEntityScoreParam + { + } + + + public static class GetEntityScoresParam + { + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"); + public static readonly Param SORT_BY=new Param("sort_by", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"); + public static readonly Param SORT_ORDER=new Param("sort_order", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"); + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"); + public static readonly Param PAGE_TOKEN=new Param("page_token", "com.zoho.crm.api.EntityScores.GetEntityScoresParam"); + } + + + public static class GetEntityScoresHeader + { + public static readonly Header IF_MODIFIED_SINCE=new Header("If-Modified-Since", "com.zoho.crm.api.EntityScores.GetEntityScoresHeader"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Info.cs new file mode 100644 index 0000000..543b4fb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Info.cs @@ -0,0 +1,227 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class Info : Model + { + private int? perPage; + private string nextPageToken; + private int? count; + private string sortBy; + private int? page; + private string previousPageToken; + private string pageTokenExpiry; + private string sortOrder; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public string NextPageToken + { + /// The method to get the nextPageToken + /// string representing the nextPageToken + get + { + return this.nextPageToken; + + } + /// The method to set the value to nextPageToken + /// string + set + { + this.nextPageToken=value; + + this.keyModified["next_page_token"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public string SortBy + { + /// The method to get the sortBy + /// string representing the sortBy + get + { + return this.sortBy; + + } + /// The method to set the value to sortBy + /// string + set + { + this.sortBy=value; + + this.keyModified["sort_by"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public string PreviousPageToken + { + /// The method to get the previousPageToken + /// string representing the previousPageToken + get + { + return this.previousPageToken; + + } + /// The method to set the value to previousPageToken + /// string + set + { + this.previousPageToken=value; + + this.keyModified["previous_page_token"] = 1; + + } + } + + public string PageTokenExpiry + { + /// The method to get the pageTokenExpiry + /// string representing the pageTokenExpiry + get + { + return this.pageTokenExpiry; + + } + /// The method to set the value to pageTokenExpiry + /// string + set + { + this.pageTokenExpiry=value; + + this.keyModified["page_token_expiry"] = 1; + + } + } + + public string SortOrder + { + /// The method to get the sortOrder + /// string representing the sortOrder + get + { + return this.sortOrder; + + } + /// The method to set the value to sortOrder + /// string + set + { + this.sortOrder=value; + + this.keyModified["sort_order"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Module.cs new file mode 100644 index 0000000..b3f9e99 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class Module : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ResponseHandler.cs new file mode 100644 index 0000000..9298b45 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.EntityScores +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ResponseWrapper.cs new file mode 100644 index 0000000..b59be64 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ScoringRule.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ScoringRule.cs new file mode 100644 index 0000000..5548bdc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/EntityScores/ScoringRule.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.EntityScores +{ + + public class ScoringRule : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Exception/SDKException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Exception/SDKException.cs new file mode 100644 index 0000000..f27275d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Exception/SDKException.cs @@ -0,0 +1,142 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Com.Zoho.API.Exception +{ + /// + /// This class is the common SDKException object. This stands as a POJO for the SDKException thrown. + /// + public class SDKException : System.Exception + { + private string code; + private string message; + private System.Exception cause; + private JObject details; + + /// + /// Creates an SDKException class instance with the specified parameters. + /// + /// A string containing the Exception error code. + /// A string containing the Exception error message. + /// An Exception class instance. + public SDKException(string code, string message, System.Exception cause) : this(code: code, message: message, details: null, cause: cause) { } + + + /// + /// Creates an SDKException class instance with the specified parameters. + /// + /// A string containing the Exception error code. + /// A string containing the Exception error message. + /// A JSONObject containing the error response. + public SDKException(string code, string message, JObject details) : this(code, message: message, details: details, cause: null) { } + + /// + /// Creates an SDKException class instance with the specified parameters. + /// + /// A string containing the Exception error code. + /// A JSONObject containing the error response. + public SDKException(string code, JObject details) : this(code, message: null, details: details, cause: null) { } + + /// + /// Creates an SDKException class instance with the specified parameters. + /// + /// A string containing the Exception error code. + /// A string containing the Exception error message. + public SDKException(string code, string message) : this(code: code, message: message, details: null, cause: null) { } + + /// + /// Creates an SDKException class instance with the specified parameters. + /// + /// An Exception class instance. + public SDKException(System.Exception cause) : this(null, cause.Message, cause) { } + + /// + /// Creates an SDKException class instance with the specified parameters. + /// + /// A string containing the Exception error message. + /// An Exception class instance. + public SDKException(string message, System.Exception cause) : this(code: null, message: message, details: null, cause: cause) { } + + + /// + /// Creates an SDKException class instance with the specified parameters. + /// + /// A string containing the Exception error code. + /// A string containing the Exception error message. + /// A JObject containing the error response. + /// An Exception class instance. + public SDKException(string code, string message, JObject details, System.Exception cause) : base(message, cause) + { + this.code = code; + this.message = message; + this.details = details; + this.cause = cause; + } + + /// + /// This is a getter method to get Exception error code. + /// + /// A String representing the Exception error code. + public string Code + { + get + { + return code; + } + } + + /// + /// This is a getter method to get Exception error message. + /// + /// A String representing the Exception error message. + public override string Message + { + get + { + return message; + } + } + + /// + /// This is a getter method to get Exception class instance. + /// + /// A Exception class instance. + public System.Exception Cause + { + get + { + return cause; + } + } + + /// + /// This is a getter method to get error response JSONObject. + /// + /// A JSONObject representing the error response. + public JObject Details + { + get + { + return details; + } + } + + public override string ToString() + { + string returnMsg = typeof(SDKException).FullName + ". Caused by : "; + if (this.details != null) + { + this.message = this.message != null ? this.message + JsonConvert.SerializeObject(this.details) : JsonConvert.SerializeObject(this.details); + } + if (Code != null) + { + returnMsg += Code + " - " + Message; + } + else + { + returnMsg += Message; + } + return returnMsg; + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/APIException.cs new file mode 100644 index 0000000..e37a19c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Features +{ + + public class APIException : Model, ResponseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Component.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Component.cs new file mode 100644 index 0000000..f3ef5b7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Component.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Features +{ + + public class Component : Model + { + private string apiName; + private bool? moduleSupported; + private Detail details; + private string featureLabel; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public bool? ModuleSupported + { + /// The method to get the moduleSupported + /// bool? representing the moduleSupported + get + { + return this.moduleSupported; + + } + /// The method to set the value to moduleSupported + /// bool? + set + { + this.moduleSupported=value; + + this.keyModified["module_supported"] = 1; + + } + } + + public Detail Details + { + /// The method to get the details + /// Instance of Detail + get + { + return this.details; + + } + /// The method to set the value to details + /// Instance of Detail + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string FeatureLabel + { + /// The method to get the featureLabel + /// string representing the featureLabel + get + { + return this.featureLabel; + + } + /// The method to set the value to featureLabel + /// string + set + { + this.featureLabel=value; + + this.keyModified["feature_label"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Detail.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Detail.cs new file mode 100644 index 0000000..2d91aa3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Detail.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Features +{ + + public class Detail : Model + { + private Limit availableCount; + private Limit limits; + private Limit usedCount; + private Dictionary keyModified=new Dictionary(); + + public Limit AvailableCount + { + /// The method to get the availableCount + /// Instance of Limit + get + { + return this.availableCount; + + } + /// The method to set the value to availableCount + /// Instance of Limit + set + { + this.availableCount=value; + + this.keyModified["available_count"] = 1; + + } + } + + public Limit Limits + { + /// The method to get the limits + /// Instance of Limit + get + { + return this.limits; + + } + /// The method to set the value to limits + /// Instance of Limit + set + { + this.limits=value; + + this.keyModified["limits"] = 1; + + } + } + + public Limit UsedCount + { + /// The method to get the usedCount + /// Instance of Limit + get + { + return this.usedCount; + + } + /// The method to set the value to usedCount + /// Instance of Limit + set + { + this.usedCount=value; + + this.keyModified["used_count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Feature.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Feature.cs new file mode 100644 index 0000000..c7b3513 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Feature.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Features +{ + + public class Feature : Model + { + private string apiName; + private Feature parentFeature; + private bool? moduleSupported; + private Detail details; + private string featureLabel; + private List components; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public Feature ParentFeature + { + /// The method to get the parentFeature + /// Instance of Feature + get + { + return this.parentFeature; + + } + /// The method to set the value to parentFeature + /// Instance of Feature + set + { + this.parentFeature=value; + + this.keyModified["parent_feature"] = 1; + + } + } + + public bool? ModuleSupported + { + /// The method to get the moduleSupported + /// bool? representing the moduleSupported + get + { + return this.moduleSupported; + + } + /// The method to set the value to moduleSupported + /// bool? + set + { + this.moduleSupported=value; + + this.keyModified["module_supported"] = 1; + + } + } + + public Detail Details + { + /// The method to get the details + /// Instance of Detail + get + { + return this.details; + + } + /// The method to set the value to details + /// Instance of Detail + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string FeatureLabel + { + /// The method to get the featureLabel + /// string representing the featureLabel + get + { + return this.featureLabel; + + } + /// The method to set the value to featureLabel + /// string + set + { + this.featureLabel=value; + + this.keyModified["feature_label"] = 1; + + } + } + + public List Components + { + /// The method to get the components + /// Instance of List + get + { + return this.components; + + } + /// The method to set the value to components + /// Instance of List + set + { + this.components=value; + + this.keyModified["components"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/FeaturesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/FeaturesOperations.cs new file mode 100644 index 0000000..a0eb881 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/FeaturesOperations.cs @@ -0,0 +1,116 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Features +{ + + public class FeaturesOperations + { + /// The method to get feature details + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetFeatureDetails(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/__features"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get feature detail + /// string + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetFeatureDetail(string featureAPIName, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/__features/"); + + apiPath=string.Concat(apiPath, featureAPIName.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get data enrichment + /// Instance of APIResponse + public APIResponse GetDataEnrichment() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/__features/data_enrichment"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get user licences count + /// Instance of APIResponse + public APIResponse GetUserLicencesCount() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/__features/user_licenses"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetFeatureDetailsParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Features.GetFeatureDetailsParam"); + public static readonly Param API_NAMES=new Param("api_names", "com.zoho.crm.api.Features.GetFeatureDetailsParam"); + } + + + public static class GetFeatureDetailParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Features.GetFeatureDetailParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Info.cs new file mode 100644 index 0000000..1478863 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Features +{ + + public class Info : Model + { + private int? perPage; + private int? count; + private int? page; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Limit.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Limit.cs new file mode 100644 index 0000000..51bec71 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/Limit.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Features +{ + + public class Limit : Model + { + private int? total; + private int? editionLimit; + private Dictionary keyModified=new Dictionary(); + + public int? Total + { + /// The method to get the total + /// int? representing the total + get + { + return this.total; + + } + /// The method to set the value to total + /// int? + set + { + this.total=value; + + this.keyModified["total"] = 1; + + } + } + + public int? EditionLimit + { + /// The method to get the editionLimit + /// int? representing the editionLimit + get + { + return this.editionLimit; + + } + /// The method to set the value to editionLimit + /// int? + set + { + this.editionLimit=value; + + this.keyModified["edition_limit"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/ResponseHandler.cs new file mode 100644 index 0000000..6b33297 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Features +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/ResponseWrapper.cs new file mode 100644 index 0000000..dc219e9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Features/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Features +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List features; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Features + { + /// The method to get the features + /// Instance of List + get + { + return this.features; + + } + /// The method to set the value to features + /// Instance of List + set + { + this.features=value; + + this.keyModified["__features"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/APIException.cs new file mode 100644 index 0000000..c2f7f11 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldAttachments +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/FieldAttachmentsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/FieldAttachmentsOperations.cs new file mode 100644 index 0000000..af936c0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/FieldAttachmentsOperations.cs @@ -0,0 +1,66 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.FieldAttachments +{ + + public class FieldAttachmentsOperations + { + private long? fieldsAttachmentId; + private long? recordId; + private string moduleAPIName; + + /// /// Creates an instance of FieldAttachmentsOperations with the given parameters + /// string + /// long? + /// long? + + public FieldAttachmentsOperations(string moduleAPIName, long? recordId, long? fieldsAttachmentId) + { + this.moduleAPIName=moduleAPIName; + + this.recordId=recordId; + + this.fieldsAttachmentId=fieldsAttachmentId; + + + } + + /// The method to get field attachments + /// Instance of APIResponse + public APIResponse GetFieldAttachments() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.moduleAPIName.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.recordId.ToString()); + + apiPath=string.Concat(apiPath, "/actions/download_fields_attachment"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("fields_attachment_id", "com.zoho.crm.api.FieldAttachments.GetFieldAttachmentsParam"), this.fieldsAttachmentId); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/x-download"); + + + } + + + public static class GetFieldAttachmentsParam + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/FileBodyWrapper.cs new file mode 100644 index 0000000..5504aa4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldAttachments +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/ResponseHandler.cs new file mode 100644 index 0000000..e5fede1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldAttachments/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FieldAttachments +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/APIException.cs new file mode 100644 index 0000000..f4f42a8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class APIException : Model, ActionResponse, ActionHandler, ResponseHandler + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionHandler.cs new file mode 100644 index 0000000..33568fc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionResponse.cs new file mode 100644 index 0000000..70be118 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionWrapper.cs new file mode 100644 index 0000000..b51c445 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class ActionWrapper : Model, ActionHandler + { + private List mapDependency; + private Dictionary keyModified=new Dictionary(); + + public List MapDependency + { + /// The method to get the mapDependency + /// Instance of List + get + { + return this.mapDependency; + + } + /// The method to set the value to mapDependency + /// Instance of List + set + { + this.mapDependency=value; + + this.keyModified["map_dependency"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/BodyWrapper.cs new file mode 100644 index 0000000..e334726 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class BodyWrapper : Model + { + private List mapDependency; + private Dictionary keyModified=new Dictionary(); + + public List MapDependency + { + /// The method to get the mapDependency + /// Instance of List + get + { + return this.mapDependency; + + } + /// The method to set the value to mapDependency + /// Instance of List + set + { + this.mapDependency=value; + + this.keyModified["map_dependency"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Child.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Child.cs new file mode 100644 index 0000000..b20339e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Child.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class Child : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/FieldMapDependencyOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/FieldMapDependencyOperations.cs new file mode 100644 index 0000000..5884aa2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/FieldMapDependencyOperations.cs @@ -0,0 +1,220 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class FieldMapDependencyOperations + { + private string module; + private long? layoutId; + + /// /// Creates an instance of FieldMapDependencyOperations with the given parameters + /// long? + /// string + + public FieldMapDependencyOperations(long? layoutId, string module) + { + this.layoutId=layoutId; + + this.module=module; + + + } + + /// The method to create map dependency + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateMapDependency(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/layouts/"); + + apiPath=string.Concat(apiPath, this.layoutId.ToString()); + + apiPath=string.Concat(apiPath, "/map_dependency"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.CreateMapDependencyParam"), this.module); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get map dependencies + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetMapDependencies(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/layouts/"); + + apiPath=string.Concat(apiPath, this.layoutId.ToString()); + + apiPath=string.Concat(apiPath, "/map_dependency"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"), this.module); + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update map dependency + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateMapDependency(long? dependencyId, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/layouts/"); + + apiPath=string.Concat(apiPath, this.layoutId.ToString()); + + apiPath=string.Concat(apiPath, "/map_dependency/"); + + apiPath=string.Concat(apiPath, dependencyId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.UpdateMapDependencyParam"), this.module); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get map dependency + /// long? + /// Instance of APIResponse + public APIResponse GetMapDependency(long? dependencyId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/layouts/"); + + apiPath=string.Concat(apiPath, this.layoutId.ToString()); + + apiPath=string.Concat(apiPath, "/map_dependency/"); + + apiPath=string.Concat(apiPath, dependencyId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.GetMapDependencyParam"), this.module); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to delete map dependency + /// long? + /// Instance of APIResponse + public APIResponse DeleteMapDependency(long? dependencyId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/layouts/"); + + apiPath=string.Concat(apiPath, this.layoutId.ToString()); + + apiPath=string.Concat(apiPath, "/map_dependency/"); + + apiPath=string.Concat(apiPath, dependencyId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.FieldMapDependency.DeleteMapDependencyParam"), this.module); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class CreateMapDependencyParam + { + } + + + public static class CreateMapDependencyHeader + { + } + + + public static class GetMapDependenciesParam + { + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"); + public static readonly Param FILTERS=new Param("filters", "com.zoho.crm.api.FieldMapDependency.GetMapDependenciesParam"); + } + + + public static class UpdateMapDependencyParam + { + } + + + public static class GetMapDependencyParam + { + } + + + public static class DeleteMapDependencyParam + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Info.cs new file mode 100644 index 0000000..671dd21 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class Info : Model + { + private int? page; + private int? perPage; + private int? count; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/MapDependency.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/MapDependency.cs new file mode 100644 index 0000000..457b322 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/MapDependency.cs @@ -0,0 +1,227 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class MapDependency : Model + { + private Parent parent; + private Child child; + private List pickListValues; + private bool? internal1; + private bool? active; + private long? id; + private int? source; + private int? category; + private SubModule subModule; + private Dictionary keyModified=new Dictionary(); + + public Parent Parent + { + /// The method to get the parent + /// Instance of Parent + get + { + return this.parent; + + } + /// The method to set the value to parent + /// Instance of Parent + set + { + this.parent=value; + + this.keyModified["parent"] = 1; + + } + } + + public Child Child + { + /// The method to get the child + /// Instance of Child + get + { + return this.child; + + } + /// The method to set the value to child + /// Instance of Child + set + { + this.child=value; + + this.keyModified["child"] = 1; + + } + } + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + public bool? Internal + { + /// The method to get the internal + /// bool? representing the internal1 + get + { + return this.internal1; + + } + /// The method to set the value to internal + /// bool? + set + { + this.internal1=value; + + this.keyModified["internal"] = 1; + + } + } + + public bool? Active + { + /// The method to get the active + /// bool? representing the active + get + { + return this.active; + + } + /// The method to set the value to active + /// bool? + set + { + this.active=value; + + this.keyModified["active"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public int? Source + { + /// The method to get the source + /// int? representing the source + get + { + return this.source; + + } + /// The method to set the value to source + /// int? + set + { + this.source=value; + + this.keyModified["source"] = 1; + + } + } + + public int? Category + { + /// The method to get the category + /// int? representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// int? + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public SubModule SubModule + { + /// The method to get the subModule + /// Instance of SubModule + get + { + return this.subModule; + + } + /// The method to set the value to subModule + /// Instance of SubModule + set + { + this.subModule=value; + + this.keyModified["sub_module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Parent.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Parent.cs new file mode 100644 index 0000000..3546626 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/Parent.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class Parent : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/PickListMapping.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/PickListMapping.cs new file mode 100644 index 0000000..66d746d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/PickListMapping.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class PickListMapping : Model + { + private long? id; + private string actualValue; + private string displayValue; + private List maps; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public List Maps + { + /// The method to get the maps + /// Instance of List + get + { + return this.maps; + + } + /// The method to set the value to maps + /// Instance of List + set + { + this.maps=value; + + this.keyModified["maps"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/PicklistMap.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/PicklistMap.cs new file mode 100644 index 0000000..8289ab8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/PicklistMap.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class PicklistMap : Model + { + private long? id; + private string actualValue; + private string displayValue; + private bool? delete; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public bool? Delete + { + /// The method to get the delete + /// bool? representing the delete + get + { + return this.delete; + + } + /// The method to set the value to delete + /// bool? + set + { + this.delete=value; + + this.keyModified["_delete"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ResponseHandler.cs new file mode 100644 index 0000000..0f588ff --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ResponseWrapper.cs new file mode 100644 index 0000000..e54cc56 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List mapDependency; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List MapDependency + { + /// The method to get the mapDependency + /// Instance of List + get + { + return this.mapDependency; + + } + /// The method to set the value to mapDependency + /// Instance of List + set + { + this.mapDependency=value; + + this.keyModified["map_dependency"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/SubModule.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/SubModule.cs new file mode 100644 index 0000000..d9608fe --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/SubModule.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class SubModule : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/SuccessResponse.cs new file mode 100644 index 0000000..90cc9c1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FieldMapDependency/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FieldMapDependency +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/APIException.cs new file mode 100644 index 0000000..39d5d45 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private string message; + private Dictionary details; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionHandler.cs new file mode 100644 index 0000000..3f4f447 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Fields +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionResponse.cs new file mode 100644 index 0000000..3ccc41c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Fields +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionWrapper.cs new file mode 100644 index 0000000..61398ea --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class ActionWrapper : Model, ActionHandler + { + private List fields; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/AssociationDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/AssociationDetails.cs new file mode 100644 index 0000000..b03206d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/AssociationDetails.cs @@ -0,0 +1,81 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class AssociationDetails : Model + { + private Modules.MinifiedModule relatedField; + private Modules.MinifiedModule lookupField; + private Dictionary keyModified=new Dictionary(); + + public Modules.MinifiedModule RelatedField + { + /// The method to get the relatedField + /// Instance of MinifiedModule + get + { + return this.relatedField; + + } + /// The method to set the value to relatedField + /// Instance of MinifiedModule + set + { + this.relatedField=value; + + this.keyModified["related_field"] = 1; + + } + } + + public Modules.MinifiedModule LookupField + { + /// The method to get the lookupField + /// Instance of MinifiedModule + get + { + return this.lookupField; + + } + /// The method to set the value to lookupField + /// Instance of MinifiedModule + set + { + this.lookupField=value; + + this.keyModified["lookup_field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/AutoNumber.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/AutoNumber.cs new file mode 100644 index 0000000..d81b1f2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/AutoNumber.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class AutoNumber : Model + { + private int? startingNumberLength; + private string prefix; + private string suffix; + private int? startNumber; + private Dictionary keyModified=new Dictionary(); + + public int? StartingNumberLength + { + /// The method to get the startingNumberLength + /// int? representing the startingNumberLength + get + { + return this.startingNumberLength; + + } + /// The method to set the value to startingNumberLength + /// int? + set + { + this.startingNumberLength=value; + + this.keyModified["starting_number_length"] = 1; + + } + } + + public string Prefix + { + /// The method to get the prefix + /// string representing the prefix + get + { + return this.prefix; + + } + /// The method to set the value to prefix + /// string + set + { + this.prefix=value; + + this.keyModified["prefix"] = 1; + + } + } + + public string Suffix + { + /// The method to get the suffix + /// string representing the suffix + get + { + return this.suffix; + + } + /// The method to set the value to suffix + /// string + set + { + this.suffix=value; + + this.keyModified["suffix"] = 1; + + } + } + + public int? StartNumber + { + /// The method to get the startNumber + /// int? representing the startNumber + get + { + return this.startNumber; + + } + /// The method to set the value to startNumber + /// int? + set + { + this.startNumber=value; + + this.keyModified["start_number"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/BodyWrapper.cs new file mode 100644 index 0000000..953a683 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class BodyWrapper : Model + { + private List fields; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ConvertMapping.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ConvertMapping.cs new file mode 100644 index 0000000..29f64ac --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ConvertMapping.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class ConvertMapping : Model + { + private string contacts; + private string deals; + private string accounts; + private Dictionary keyModified=new Dictionary(); + + public string Contacts + { + /// The method to get the contacts + /// string representing the contacts + get + { + return this.contacts; + + } + /// The method to set the value to contacts + /// string + set + { + this.contacts=value; + + this.keyModified["Contacts"] = 1; + + } + } + + public string Deals + { + /// The method to get the deals + /// string representing the deals + get + { + return this.deals; + + } + /// The method to set the value to deals + /// string + set + { + this.deals=value; + + this.keyModified["Deals"] = 1; + + } + } + + public string Accounts + { + /// The method to get the accounts + /// string representing the accounts + get + { + return this.accounts; + + } + /// The method to set the value to accounts + /// string + set + { + this.accounts=value; + + this.keyModified["Accounts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Criteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Criteria.cs new file mode 100644 index 0000000..3e5c6fd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Criteria.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Criteria : Model + { + private string comparator; + private MinifiedField field; + private object value; + private string groupOperator; + private List group; + private Dictionary keyModified=new Dictionary(); + + public string Comparator + { + /// The method to get the comparator + /// string representing the comparator + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// string + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + public MinifiedField Field + { + /// The method to get the field + /// Instance of MinifiedField + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of MinifiedField + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + public string GroupOperator + { + /// The method to get the groupOperator + /// string representing the groupOperator + get + { + return this.groupOperator; + + } + /// The method to set the value to groupOperator + /// string + set + { + this.groupOperator=value; + + this.keyModified["group_operator"] = 1; + + } + } + + public List Group + { + /// The method to get the group + /// Instance of List + get + { + return this.group; + + } + /// The method to set the value to group + /// Instance of List + set + { + this.group=value; + + this.keyModified["group"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Crypt.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Crypt.cs new file mode 100644 index 0000000..15e732d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Crypt.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Crypt : Model + { + private string mode; + private int? status; + private string column; + private string table; + private List encfldids; + private string notify; + private Dictionary keyModified=new Dictionary(); + + public string Mode + { + /// The method to get the mode + /// string representing the mode + get + { + return this.mode; + + } + /// The method to set the value to mode + /// string + set + { + this.mode=value; + + this.keyModified["mode"] = 1; + + } + } + + public int? Status + { + /// The method to get the status + /// int? representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// int? + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public string Column + { + /// The method to get the column + /// string representing the column + get + { + return this.column; + + } + /// The method to set the value to column + /// string + set + { + this.column=value; + + this.keyModified["column"] = 1; + + } + } + + public string Table + { + /// The method to get the table + /// string representing the table + get + { + return this.table; + + } + /// The method to set the value to table + /// string + set + { + this.table=value; + + this.keyModified["table"] = 1; + + } + } + + public List Encfldids + { + /// The method to get the encfldids + /// Instance of List + get + { + return this.encfldids; + + } + /// The method to set the value to encfldids + /// Instance of List + set + { + this.encfldids=value; + + this.keyModified["encFldIds"] = 1; + + } + } + + public string Notify + { + /// The method to get the notify + /// string representing the notify + get + { + return this.notify; + + } + /// The method to set the value to notify + /// string + set + { + this.notify=value; + + this.keyModified["notify"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Currency.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Currency.cs new file mode 100644 index 0000000..8b910d3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Currency.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Currency : Model + { + private Choice roundingOption; + private int? precision; + private Dictionary keyModified=new Dictionary(); + + public Choice RoundingOption + { + /// The method to get the roundingOption + /// Instance of Choice + get + { + return this.roundingOption; + + } + /// The method to set the value to roundingOption + /// Instance of Choice + set + { + this.roundingOption=value; + + this.keyModified["rounding_option"] = 1; + + } + } + + public int? Precision + { + /// The method to get the precision + /// int? representing the precision + get + { + return this.precision; + + } + /// The method to set the value to precision + /// int? + set + { + this.precision=value; + + this.keyModified["precision"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/EmailParser.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/EmailParser.cs new file mode 100644 index 0000000..78bf6fc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/EmailParser.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class EmailParser : Model + { + private bool? fieldsUpdateSupported; + private bool? recordOperationsSupported; + private Dictionary keyModified=new Dictionary(); + + public bool? FieldsUpdateSupported + { + /// The method to get the fieldsUpdateSupported + /// bool? representing the fieldsUpdateSupported + get + { + return this.fieldsUpdateSupported; + + } + /// The method to set the value to fieldsUpdateSupported + /// bool? + set + { + this.fieldsUpdateSupported=value; + + this.keyModified["fields_update_supported"] = 1; + + } + } + + public bool? RecordOperationsSupported + { + /// The method to get the recordOperationsSupported + /// bool? representing the recordOperationsSupported + get + { + return this.recordOperationsSupported; + + } + /// The method to set the value to recordOperationsSupported + /// bool? + set + { + this.recordOperationsSupported=value; + + this.keyModified["record_operations_supported"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Expression.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Expression.cs new file mode 100644 index 0000000..a3b41fb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Expression.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Expression : Model + { + private List functionParameters; + private RollupCriteria criteria; + private string function; + private Dictionary keyModified=new Dictionary(); + + public List FunctionParameters + { + /// The method to get the functionParameters + /// Instance of List + get + { + return this.functionParameters; + + } + /// The method to set the value to functionParameters + /// Instance of List + set + { + this.functionParameters=value; + + this.keyModified["function_parameters"] = 1; + + } + } + + public RollupCriteria Criteria + { + /// The method to get the criteria + /// Instance of RollupCriteria + get + { + return this.criteria; + + } + /// The method to set the value to criteria + /// Instance of RollupCriteria + set + { + this.criteria=value; + + this.keyModified["criteria"] = 1; + + } + } + + public string Function + { + /// The method to get the function + /// string representing the function + get + { + return this.function; + + } + /// The method to set the value to function + /// string + set + { + this.function=value; + + this.keyModified["function"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/External.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/External.cs new file mode 100644 index 0000000..551ff93 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/External.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class External : Model + { + private bool? show; + private string type; + private bool? allowMultipleConfig; + private Dictionary keyModified=new Dictionary(); + + public bool? Show + { + /// The method to get the show + /// bool? representing the show + get + { + return this.show; + + } + /// The method to set the value to show + /// bool? + set + { + this.show=value; + + this.keyModified["show"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public bool? AllowMultipleConfig + { + /// The method to get the allowMultipleConfig + /// bool? representing the allowMultipleConfig + get + { + return this.allowMultipleConfig; + + } + /// The method to set the value to allowMultipleConfig + /// bool? + set + { + this.allowMultipleConfig=value; + + this.keyModified["allow_multiple_config"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Fields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Fields.cs new file mode 100644 index 0000000..bbde34d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Fields.cs @@ -0,0 +1,1678 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Fields : Model + { + private Modules.MinifiedModule associatedModule; + private string dataType; + private OperationType operationType; + private bool? systemMandatory; + private bool? webhook; + private int? sequenceNumber; + private string defaultValue; + private bool? blueprintSupported; + private bool? virtualField; + private bool? fieldReadOnly; + private List customizableProperties; + private bool? readOnly; + private bool? customField; + private bool? businesscardSupported; + private bool? filterable; + private bool? visible; + private bool? availableInUserLayout; + private bool? displayField; + private bool? pickListValuesSortedLexically; + private bool? sortable; + private List layoutAssociations; + private bool? separator; + private bool? searchable; + private bool? enableColourCode; + private bool? massUpdate; + private string jsonType; + private string createdSource; + private string type; + private string displayLabel; + private string columnName; + private string apiName; + private int? displayType; + private int? uiType; + private bool? colourCodeEnabledBySystem; + private int? length; + private int? decimalPlace; + private string quickSequenceNumber; + private EmailParser emailParser; + private RollupSummary rollupSummary; + private ReferFromField referFromField; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private int? showType; + private int? category; + private long? id; + private MultiModuleLookup multiModuleLookup; + private Modules.SharingProperties sharingProperties; + private Currency currency; + private List fileUpoladOptionlist; + private Lookup lookup; + private List profiles; + private ViewType viewType; + private Unique unique; + private Modules.MinifiedModule subModule; + private Subform subform; + private External external; + private Formula formula; + private Private private1; + private ConvertMapping convertMapping; + private Multiselectlookup multiselectlookup; + private Multiselectlookup multiuserlookup; + private AutoNumber autonumber; + private AutoNumber autoNumber61; + private List pickListValues; + private Crypt crypt; + private Tooltip tooltip; + private HistoryTracking historyTracking; + private AssociationDetails associationDetails; + private List allowedModules; + private string additionalColumn; + private string fieldLabel; + private object globalPicklist; + private bool? hipaaComplianceEnabled; + private HipaaCompliance hipaaCompliance; + private bool? updateexistingrecords; + private bool? numberSeparator; + private Textarea textarea; + private bool? staticField; + private Dictionary keyModified=new Dictionary(); + + public Modules.MinifiedModule AssociatedModule + { + /// The method to get the associatedModule + /// Instance of MinifiedModule + get + { + return this.associatedModule; + + } + /// The method to set the value to associatedModule + /// Instance of MinifiedModule + set + { + this.associatedModule=value; + + this.keyModified["associated_module"] = 1; + + } + } + + public string DataType + { + /// The method to get the dataType + /// string representing the dataType + get + { + return this.dataType; + + } + /// The method to set the value to dataType + /// string + set + { + this.dataType=value; + + this.keyModified["data_type"] = 1; + + } + } + + public OperationType OperationType + { + /// The method to get the operationType + /// Instance of OperationType + get + { + return this.operationType; + + } + /// The method to set the value to operationType + /// Instance of OperationType + set + { + this.operationType=value; + + this.keyModified["operation_type"] = 1; + + } + } + + public bool? SystemMandatory + { + /// The method to get the systemMandatory + /// bool? representing the systemMandatory + get + { + return this.systemMandatory; + + } + /// The method to set the value to systemMandatory + /// bool? + set + { + this.systemMandatory=value; + + this.keyModified["system_mandatory"] = 1; + + } + } + + public bool? Webhook + { + /// The method to get the webhook + /// bool? representing the webhook + get + { + return this.webhook; + + } + /// The method to set the value to webhook + /// bool? + set + { + this.webhook=value; + + this.keyModified["webhook"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public string DefaultValue + { + /// The method to get the defaultValue + /// string representing the defaultValue + get + { + return this.defaultValue; + + } + /// The method to set the value to defaultValue + /// string + set + { + this.defaultValue=value; + + this.keyModified["default_value"] = 1; + + } + } + + public bool? BlueprintSupported + { + /// The method to get the blueprintSupported + /// bool? representing the blueprintSupported + get + { + return this.blueprintSupported; + + } + /// The method to set the value to blueprintSupported + /// bool? + set + { + this.blueprintSupported=value; + + this.keyModified["blueprint_supported"] = 1; + + } + } + + public bool? VirtualField + { + /// The method to get the virtualField + /// bool? representing the virtualField + get + { + return this.virtualField; + + } + /// The method to set the value to virtualField + /// bool? + set + { + this.virtualField=value; + + this.keyModified["virtual_field"] = 1; + + } + } + + public bool? FieldReadOnly + { + /// The method to get the fieldReadOnly + /// bool? representing the fieldReadOnly + get + { + return this.fieldReadOnly; + + } + /// The method to set the value to fieldReadOnly + /// bool? + set + { + this.fieldReadOnly=value; + + this.keyModified["field_read_only"] = 1; + + } + } + + public List CustomizableProperties + { + /// The method to get the customizableProperties + /// Instance of List + get + { + return this.customizableProperties; + + } + /// The method to set the value to customizableProperties + /// Instance of List + set + { + this.customizableProperties=value; + + this.keyModified["customizable_properties"] = 1; + + } + } + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public bool? CustomField + { + /// The method to get the customField + /// bool? representing the customField + get + { + return this.customField; + + } + /// The method to set the value to customField + /// bool? + set + { + this.customField=value; + + this.keyModified["custom_field"] = 1; + + } + } + + public bool? BusinesscardSupported + { + /// The method to get the businesscardSupported + /// bool? representing the businesscardSupported + get + { + return this.businesscardSupported; + + } + /// The method to set the value to businesscardSupported + /// bool? + set + { + this.businesscardSupported=value; + + this.keyModified["businesscard_supported"] = 1; + + } + } + + public bool? Filterable + { + /// The method to get the filterable + /// bool? representing the filterable + get + { + return this.filterable; + + } + /// The method to set the value to filterable + /// bool? + set + { + this.filterable=value; + + this.keyModified["filterable"] = 1; + + } + } + + public bool? Visible + { + /// The method to get the visible + /// bool? representing the visible + get + { + return this.visible; + + } + /// The method to set the value to visible + /// bool? + set + { + this.visible=value; + + this.keyModified["visible"] = 1; + + } + } + + public bool? AvailableInUserLayout + { + /// The method to get the availableInUserLayout + /// bool? representing the availableInUserLayout + get + { + return this.availableInUserLayout; + + } + /// The method to set the value to availableInUserLayout + /// bool? + set + { + this.availableInUserLayout=value; + + this.keyModified["available_in_user_layout"] = 1; + + } + } + + public bool? DisplayField + { + /// The method to get the displayField + /// bool? representing the displayField + get + { + return this.displayField; + + } + /// The method to set the value to displayField + /// bool? + set + { + this.displayField=value; + + this.keyModified["display_field"] = 1; + + } + } + + public bool? PickListValuesSortedLexically + { + /// The method to get the pickListValuesSortedLexically + /// bool? representing the pickListValuesSortedLexically + get + { + return this.pickListValuesSortedLexically; + + } + /// The method to set the value to pickListValuesSortedLexically + /// bool? + set + { + this.pickListValuesSortedLexically=value; + + this.keyModified["pick_list_values_sorted_lexically"] = 1; + + } + } + + public bool? Sortable + { + /// The method to get the sortable + /// bool? representing the sortable + get + { + return this.sortable; + + } + /// The method to set the value to sortable + /// bool? + set + { + this.sortable=value; + + this.keyModified["sortable"] = 1; + + } + } + + public List LayoutAssociations + { + /// The method to get the layoutAssociations + /// Instance of List + get + { + return this.layoutAssociations; + + } + /// The method to set the value to layoutAssociations + /// Instance of List + set + { + this.layoutAssociations=value; + + this.keyModified["layout_associations"] = 1; + + } + } + + public bool? Separator + { + /// The method to get the separator + /// bool? representing the separator + get + { + return this.separator; + + } + /// The method to set the value to separator + /// bool? + set + { + this.separator=value; + + this.keyModified["separator"] = 1; + + } + } + + public bool? Searchable + { + /// The method to get the searchable + /// bool? representing the searchable + get + { + return this.searchable; + + } + /// The method to set the value to searchable + /// bool? + set + { + this.searchable=value; + + this.keyModified["searchable"] = 1; + + } + } + + public bool? EnableColourCode + { + /// The method to get the enableColourCode + /// bool? representing the enableColourCode + get + { + return this.enableColourCode; + + } + /// The method to set the value to enableColourCode + /// bool? + set + { + this.enableColourCode=value; + + this.keyModified["enable_colour_code"] = 1; + + } + } + + public bool? MassUpdate + { + /// The method to get the massUpdate + /// bool? representing the massUpdate + get + { + return this.massUpdate; + + } + /// The method to set the value to massUpdate + /// bool? + set + { + this.massUpdate=value; + + this.keyModified["mass_update"] = 1; + + } + } + + public string JsonType + { + /// The method to get the jsonType + /// string representing the jsonType + get + { + return this.jsonType; + + } + /// The method to set the value to jsonType + /// string + set + { + this.jsonType=value; + + this.keyModified["json_type"] = 1; + + } + } + + public string CreatedSource + { + /// The method to get the createdSource + /// string representing the createdSource + get + { + return this.createdSource; + + } + /// The method to set the value to createdSource + /// string + set + { + this.createdSource=value; + + this.keyModified["created_source"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string ColumnName + { + /// The method to get the columnName + /// string representing the columnName + get + { + return this.columnName; + + } + /// The method to set the value to columnName + /// string + set + { + this.columnName=value; + + this.keyModified["column_name"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public int? DisplayType + { + /// The method to get the displayType + /// int? representing the displayType + get + { + return this.displayType; + + } + /// The method to set the value to displayType + /// int? + set + { + this.displayType=value; + + this.keyModified["display_type"] = 1; + + } + } + + public int? UiType + { + /// The method to get the uiType + /// int? representing the uiType + get + { + return this.uiType; + + } + /// The method to set the value to uiType + /// int? + set + { + this.uiType=value; + + this.keyModified["ui_type"] = 1; + + } + } + + public bool? ColourCodeEnabledBySystem + { + /// The method to get the colourCodeEnabledBySystem + /// bool? representing the colourCodeEnabledBySystem + get + { + return this.colourCodeEnabledBySystem; + + } + /// The method to set the value to colourCodeEnabledBySystem + /// bool? + set + { + this.colourCodeEnabledBySystem=value; + + this.keyModified["colour_code_enabled_by_system"] = 1; + + } + } + + public int? Length + { + /// The method to get the length + /// int? representing the length + get + { + return this.length; + + } + /// The method to set the value to length + /// int? + set + { + this.length=value; + + this.keyModified["length"] = 1; + + } + } + + public int? DecimalPlace + { + /// The method to get the decimalPlace + /// int? representing the decimalPlace + get + { + return this.decimalPlace; + + } + /// The method to set the value to decimalPlace + /// int? + set + { + this.decimalPlace=value; + + this.keyModified["decimal_place"] = 1; + + } + } + + public string QuickSequenceNumber + { + /// The method to get the quickSequenceNumber + /// string representing the quickSequenceNumber + get + { + return this.quickSequenceNumber; + + } + /// The method to set the value to quickSequenceNumber + /// string + set + { + this.quickSequenceNumber=value; + + this.keyModified["quick_sequence_number"] = 1; + + } + } + + public EmailParser EmailParser + { + /// The method to get the emailParser + /// Instance of EmailParser + get + { + return this.emailParser; + + } + /// The method to set the value to emailParser + /// Instance of EmailParser + set + { + this.emailParser=value; + + this.keyModified["email_parser"] = 1; + + } + } + + public RollupSummary RollupSummary + { + /// The method to get the rollupSummary + /// Instance of RollupSummary + get + { + return this.rollupSummary; + + } + /// The method to set the value to rollupSummary + /// Instance of RollupSummary + set + { + this.rollupSummary=value; + + this.keyModified["rollup_summary"] = 1; + + } + } + + public ReferFromField ReferFromField + { + /// The method to get the referFromField + /// Instance of ReferFromField + get + { + return this.referFromField; + + } + /// The method to set the value to referFromField + /// Instance of ReferFromField + set + { + this.referFromField=value; + + this.keyModified["refer_from_field"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public int? ShowType + { + /// The method to get the showType + /// int? representing the showType + get + { + return this.showType; + + } + /// The method to set the value to showType + /// int? + set + { + this.showType=value; + + this.keyModified["show_type"] = 1; + + } + } + + public int? Category + { + /// The method to get the category + /// int? representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// int? + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public MultiModuleLookup MultiModuleLookup + { + /// The method to get the multiModuleLookup + /// Instance of MultiModuleLookup + get + { + return this.multiModuleLookup; + + } + /// The method to set the value to multiModuleLookup + /// Instance of MultiModuleLookup + set + { + this.multiModuleLookup=value; + + this.keyModified["multi_module_lookup"] = 1; + + } + } + + public Modules.SharingProperties SharingProperties + { + /// The method to get the sharingProperties + /// Instance of SharingProperties + get + { + return this.sharingProperties; + + } + /// The method to set the value to sharingProperties + /// Instance of SharingProperties + set + { + this.sharingProperties=value; + + this.keyModified["sharing_properties"] = 1; + + } + } + + public Currency Currency + { + /// The method to get the currency + /// Instance of Currency + get + { + return this.currency; + + } + /// The method to set the value to currency + /// Instance of Currency + set + { + this.currency=value; + + this.keyModified["currency"] = 1; + + } + } + + public List FileUpoladOptionlist + { + /// The method to get the fileUpoladOptionlist + /// Instance of List + get + { + return this.fileUpoladOptionlist; + + } + /// The method to set the value to fileUpoladOptionlist + /// Instance of List + set + { + this.fileUpoladOptionlist=value; + + this.keyModified["file_upolad_optionlist"] = 1; + + } + } + + public Lookup Lookup + { + /// The method to get the lookup + /// Instance of Lookup + get + { + return this.lookup; + + } + /// The method to set the value to lookup + /// Instance of Lookup + set + { + this.lookup=value; + + this.keyModified["lookup"] = 1; + + } + } + + public List Profiles + { + /// The method to get the profiles + /// Instance of List + get + { + return this.profiles; + + } + /// The method to set the value to profiles + /// Instance of List + set + { + this.profiles=value; + + this.keyModified["profiles"] = 1; + + } + } + + public ViewType ViewType + { + /// The method to get the viewType + /// Instance of ViewType + get + { + return this.viewType; + + } + /// The method to set the value to viewType + /// Instance of ViewType + set + { + this.viewType=value; + + this.keyModified["view_type"] = 1; + + } + } + + public Unique Unique + { + /// The method to get the unique + /// Instance of Unique + get + { + return this.unique; + + } + /// The method to set the value to unique + /// Instance of Unique + set + { + this.unique=value; + + this.keyModified["unique"] = 1; + + } + } + + public Modules.MinifiedModule SubModule + { + /// The method to get the subModule + /// Instance of MinifiedModule + get + { + return this.subModule; + + } + /// The method to set the value to subModule + /// Instance of MinifiedModule + set + { + this.subModule=value; + + this.keyModified["sub_module"] = 1; + + } + } + + public Subform Subform + { + /// The method to get the subform + /// Instance of Subform + get + { + return this.subform; + + } + /// The method to set the value to subform + /// Instance of Subform + set + { + this.subform=value; + + this.keyModified["subform"] = 1; + + } + } + + public External External + { + /// The method to get the external + /// Instance of External + get + { + return this.external; + + } + /// The method to set the value to external + /// Instance of External + set + { + this.external=value; + + this.keyModified["external"] = 1; + + } + } + + public Formula Formula + { + /// The method to get the formula + /// Instance of Formula + get + { + return this.formula; + + } + /// The method to set the value to formula + /// Instance of Formula + set + { + this.formula=value; + + this.keyModified["formula"] = 1; + + } + } + + public Private Private + { + /// The method to get the private + /// Instance of Private + get + { + return this.private1; + + } + /// The method to set the value to private + /// Instance of Private + set + { + this.private1=value; + + this.keyModified["private"] = 1; + + } + } + + public ConvertMapping ConvertMapping + { + /// The method to get the convertMapping + /// Instance of ConvertMapping + get + { + return this.convertMapping; + + } + /// The method to set the value to convertMapping + /// Instance of ConvertMapping + set + { + this.convertMapping=value; + + this.keyModified["convert_mapping"] = 1; + + } + } + + public Multiselectlookup Multiselectlookup + { + /// The method to get the multiselectlookup + /// Instance of Multiselectlookup + get + { + return this.multiselectlookup; + + } + /// The method to set the value to multiselectlookup + /// Instance of Multiselectlookup + set + { + this.multiselectlookup=value; + + this.keyModified["multiselectlookup"] = 1; + + } + } + + public Multiselectlookup Multiuserlookup + { + /// The method to get the multiuserlookup + /// Instance of Multiselectlookup + get + { + return this.multiuserlookup; + + } + /// The method to set the value to multiuserlookup + /// Instance of Multiselectlookup + set + { + this.multiuserlookup=value; + + this.keyModified["multiuserlookup"] = 1; + + } + } + + public AutoNumber Autonumber + { + /// The method to get the autonumber + /// Instance of AutoNumber + get + { + return this.autonumber; + + } + /// The method to set the value to autonumber + /// Instance of AutoNumber + set + { + this.autonumber=value; + + this.keyModified["autonumber"] = 1; + + } + } + + public AutoNumber AutoNumber61 + { + /// The method to get the autoNumber61 + /// Instance of AutoNumber + get + { + return this.autoNumber61; + + } + /// The method to set the value to autoNumber61 + /// Instance of AutoNumber + set + { + this.autoNumber61=value; + + this.keyModified["auto_number"] = 1; + + } + } + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + public Crypt Crypt + { + /// The method to get the crypt + /// Instance of Crypt + get + { + return this.crypt; + + } + /// The method to set the value to crypt + /// Instance of Crypt + set + { + this.crypt=value; + + this.keyModified["crypt"] = 1; + + } + } + + public Tooltip Tooltip + { + /// The method to get the tooltip + /// Instance of Tooltip + get + { + return this.tooltip; + + } + /// The method to set the value to tooltip + /// Instance of Tooltip + set + { + this.tooltip=value; + + this.keyModified["tooltip"] = 1; + + } + } + + public HistoryTracking HistoryTracking + { + /// The method to get the historyTracking + /// Instance of HistoryTracking + get + { + return this.historyTracking; + + } + /// The method to set the value to historyTracking + /// Instance of HistoryTracking + set + { + this.historyTracking=value; + + this.keyModified["history_tracking"] = 1; + + } + } + + public AssociationDetails AssociationDetails + { + /// The method to get the associationDetails + /// Instance of AssociationDetails + get + { + return this.associationDetails; + + } + /// The method to set the value to associationDetails + /// Instance of AssociationDetails + set + { + this.associationDetails=value; + + this.keyModified["association_details"] = 1; + + } + } + + public List AllowedModules + { + /// The method to get the allowedModules + /// Instance of List + get + { + return this.allowedModules; + + } + /// The method to set the value to allowedModules + /// Instance of List + set + { + this.allowedModules=value; + + this.keyModified["allowed_modules"] = 1; + + } + } + + public string AdditionalColumn + { + /// The method to get the additionalColumn + /// string representing the additionalColumn + get + { + return this.additionalColumn; + + } + /// The method to set the value to additionalColumn + /// string + set + { + this.additionalColumn=value; + + this.keyModified["additional_column"] = 1; + + } + } + + public string FieldLabel + { + /// The method to get the fieldLabel + /// string representing the fieldLabel + get + { + return this.fieldLabel; + + } + /// The method to set the value to fieldLabel + /// string + set + { + this.fieldLabel=value; + + this.keyModified["field_label"] = 1; + + } + } + + public object GlobalPicklist + { + /// The method to get the globalPicklist + /// object representing the globalPicklist + get + { + return this.globalPicklist; + + } + /// The method to set the value to globalPicklist + /// object + set + { + this.globalPicklist=value; + + this.keyModified["global_picklist"] = 1; + + } + } + + public bool? HipaaComplianceEnabled + { + /// The method to get the hipaaComplianceEnabled + /// bool? representing the hipaaComplianceEnabled + get + { + return this.hipaaComplianceEnabled; + + } + /// The method to set the value to hipaaComplianceEnabled + /// bool? + set + { + this.hipaaComplianceEnabled=value; + + this.keyModified["hipaa_compliance_enabled"] = 1; + + } + } + + public HipaaCompliance HipaaCompliance + { + /// The method to get the hipaaCompliance + /// Instance of HipaaCompliance + get + { + return this.hipaaCompliance; + + } + /// The method to set the value to hipaaCompliance + /// Instance of HipaaCompliance + set + { + this.hipaaCompliance=value; + + this.keyModified["hipaa_compliance"] = 1; + + } + } + + public bool? Updateexistingrecords + { + /// The method to get the updateexistingrecords + /// bool? representing the updateexistingrecords + get + { + return this.updateexistingrecords; + + } + /// The method to set the value to updateexistingrecords + /// bool? + set + { + this.updateexistingrecords=value; + + this.keyModified["_update_existing_records"] = 1; + + } + } + + public bool? NumberSeparator + { + /// The method to get the numberSeparator + /// bool? representing the numberSeparator + get + { + return this.numberSeparator; + + } + /// The method to set the value to numberSeparator + /// bool? + set + { + this.numberSeparator=value; + + this.keyModified["number_separator"] = 1; + + } + } + + public Textarea Textarea + { + /// The method to get the textarea + /// Instance of Textarea + get + { + return this.textarea; + + } + /// The method to set the value to textarea + /// Instance of Textarea + set + { + this.textarea=value; + + this.keyModified["textarea"] = 1; + + } + } + + public bool? StaticField + { + /// The method to get the staticField + /// bool? representing the staticField + get + { + return this.staticField; + + } + /// The method to set the value to staticField + /// bool? + set + { + this.staticField=value; + + this.keyModified["static_field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FieldsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FieldsOperations.cs new file mode 100644 index 0000000..01fd003 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FieldsOperations.cs @@ -0,0 +1,237 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class FieldsOperations + { + /// The method to get fields + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetFields(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fields"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create field + /// Instance of BodyWrapper + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse CreateField(BodyWrapper request, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fields"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update fields + /// Instance of BodyWrapper + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse UpdateFields(BodyWrapper request, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fields"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PATCH; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get field + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetField(long? field, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fields/"); + + apiPath=string.Concat(apiPath, field.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update field + /// long? + /// Instance of BodyWrapper + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse UpdateField(long? field, BodyWrapper request, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fields/"); + + apiPath=string.Concat(apiPath, field.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PATCH; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete field + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse DeleteField(long? field, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fields/"); + + apiPath=string.Concat(apiPath, field.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetFieldsParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Fields.GetFieldsParam"); + public static readonly Param DATA_TYPE=new Param("data_type", "com.zoho.crm.api.Fields.GetFieldsParam"); + public static readonly Param> TYPE=new Param>("type", "com.zoho.crm.api.Fields.GetFieldsParam"); + public static readonly Param INCLUDE=new Param("include", "com.zoho.crm.api.Fields.GetFieldsParam"); + public static readonly Param FEATURE_NAME=new Param("feature_name", "com.zoho.crm.api.Fields.GetFieldsParam"); + public static readonly Param COMPONENT=new Param("component", "com.zoho.crm.api.Fields.GetFieldsParam"); + public static readonly Param LAYOUT_ID=new Param("layout_id", "com.zoho.crm.api.Fields.GetFieldsParam"); + } + + + public static class GetFieldsHeader + { + } + + + public static class CreateFieldParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Fields.CreateFieldParam"); + } + + + public static class UpdateFieldsParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Fields.UpdateFieldsParam"); + } + + + public static class GetFieldParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Fields.GetFieldParam"); + public static readonly Param INCLUDE=new Param("include", "com.zoho.crm.api.Fields.GetFieldParam"); + } + + + public static class GetFieldHeader + { + } + + + public static class UpdateFieldParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Fields.UpdateFieldParam"); + } + + + public static class DeleteFieldParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Fields.DeleteFieldParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FileUpoladOption.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FileUpoladOption.cs new file mode 100644 index 0000000..e1c62bd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FileUpoladOption.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class FileUpoladOption : Model + { + private string actualValue; + private string displayValue; + private Dictionary keyModified=new Dictionary(); + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ForecastCategory.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ForecastCategory.cs new file mode 100644 index 0000000..fb3a7e0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ForecastCategory.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class ForecastCategory : Model + { + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Formula.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Formula.cs new file mode 100644 index 0000000..8934a72 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Formula.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Formula : Model + { + private string returnType; + private string expression; + private Dictionary keyModified=new Dictionary(); + + public string ReturnType + { + /// The method to get the returnType + /// string representing the returnType + get + { + return this.returnType; + + } + /// The method to set the value to returnType + /// string + set + { + this.returnType=value; + + this.keyModified["return_type"] = 1; + + } + } + + public string Expression + { + /// The method to get the expression + /// string representing the expression + get + { + return this.expression; + + } + /// The method to set the value to expression + /// string + set + { + this.expression=value; + + this.keyModified["expression"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FunctionParameter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FunctionParameter.cs new file mode 100644 index 0000000..1354928 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/FunctionParameter.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class FunctionParameter : Model + { + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HipaaCompliance.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HipaaCompliance.cs new file mode 100644 index 0000000..11ac073 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HipaaCompliance.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class HipaaCompliance : Model + { + private bool? restrictedInExport; + private bool? restricted; + private Dictionary keyModified=new Dictionary(); + + public bool? RestrictedInExport + { + /// The method to get the restrictedInExport + /// bool? representing the restrictedInExport + get + { + return this.restrictedInExport; + + } + /// The method to set the value to restrictedInExport + /// bool? + set + { + this.restrictedInExport=value; + + this.keyModified["restricted_in_export"] = 1; + + } + } + + public bool? Restricted + { + /// The method to get the restricted + /// bool? representing the restricted + get + { + return this.restricted; + + } + /// The method to set the value to restricted + /// bool? + set + { + this.restricted=value; + + this.keyModified["restricted"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HistoryTracking.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HistoryTracking.cs new file mode 100644 index 0000000..ac11b37 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HistoryTracking.cs @@ -0,0 +1,81 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class HistoryTracking : Model + { + private HistoryTrackingModule module; + private Modules.MinifiedModule durationConfiguredField; + private Dictionary keyModified=new Dictionary(); + + public HistoryTrackingModule Module + { + /// The method to get the module + /// Instance of HistoryTrackingModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of HistoryTrackingModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public Modules.MinifiedModule DurationConfiguredField + { + /// The method to get the durationConfiguredField + /// Instance of MinifiedModule + get + { + return this.durationConfiguredField; + + } + /// The method to set the value to durationConfiguredField + /// Instance of MinifiedModule + set + { + this.durationConfiguredField=value; + + this.keyModified["duration_configured_field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HistoryTrackingModule.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HistoryTrackingModule.cs new file mode 100644 index 0000000..c64cb11 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/HistoryTrackingModule.cs @@ -0,0 +1,165 @@ +using Com.Zoho.Crm.API.Layouts; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class HistoryTrackingModule : Model + { + private Layouts.Layouts layout; + private string displayLabel; + private string apiName; + private HistoryTrackingModule module; + private long? id; + private string moduleName; + private Dictionary keyModified=new Dictionary(); + + public Layouts.Layouts Layout + { + /// The method to get the layout + /// Instance of Layouts + get + { + return this.layout; + + } + /// The method to set the value to layout + /// Instance of Layouts + set + { + this.layout=value; + + this.keyModified["layout"] = 1; + + } + } + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public HistoryTrackingModule Module + { + /// The method to get the module + /// Instance of HistoryTrackingModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of HistoryTrackingModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string ModuleName + { + /// The method to get the moduleName + /// string representing the moduleName + get + { + return this.moduleName; + + } + /// The method to set the value to moduleName + /// string + set + { + this.moduleName=value; + + this.keyModified["module_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/LayoutAssociation.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/LayoutAssociation.cs new file mode 100644 index 0000000..8fd7a1d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/LayoutAssociation.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class LayoutAssociation : Model + { + private string apiName; + private string name; + private string id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Lookup.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Lookup.cs new file mode 100644 index 0000000..9c4bff0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Lookup.cs @@ -0,0 +1,186 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Lookup : Model + { + private string displayLabel; + private string apiName; + private QueryDetails queryDetails; + private Modules.MinifiedModule module; + private long? id; + private bool? revalidateFilterDuringEdit; + private List showFields; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public QueryDetails QueryDetails + { + /// The method to get the queryDetails + /// Instance of QueryDetails + get + { + return this.queryDetails; + + } + /// The method to set the value to queryDetails + /// Instance of QueryDetails + set + { + this.queryDetails=value; + + this.keyModified["query_details"] = 1; + + } + } + + public Modules.MinifiedModule Module + { + /// The method to get the module + /// Instance of MinifiedModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of MinifiedModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? RevalidateFilterDuringEdit + { + /// The method to get the revalidateFilterDuringEdit + /// bool? representing the revalidateFilterDuringEdit + get + { + return this.revalidateFilterDuringEdit; + + } + /// The method to set the value to revalidateFilterDuringEdit + /// bool? + set + { + this.revalidateFilterDuringEdit=value; + + this.keyModified["revalidate_filter_during_edit"] = 1; + + } + } + + public List ShowFields + { + /// The method to get the showFields + /// Instance of List + get + { + return this.showFields; + + } + /// The method to set the value to showFields + /// Instance of List + set + { + this.showFields=value; + + this.keyModified["show_fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MandatoryDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MandatoryDetails.cs new file mode 100644 index 0000000..fbdc655 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MandatoryDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class MandatoryDetails : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Maps.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Maps.cs new file mode 100644 index 0000000..67ff764 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Maps.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Maps : Model + { + private string apiName; + private List pickListValues; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MinifiedField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MinifiedField.cs new file mode 100644 index 0000000..ca385fb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MinifiedField.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class MinifiedField : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MultiModuleLookup.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MultiModuleLookup.cs new file mode 100644 index 0000000..0f58ebd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/MultiModuleLookup.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class MultiModuleLookup : Model + { + private string displayLabel; + private string apiName; + private List modules; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public List Modules + { + /// The method to get the modules + /// Instance of List + get + { + return this.modules; + + } + /// The method to set the value to modules + /// Instance of List + set + { + this.modules=value; + + this.keyModified["modules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Multiselectlookup.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Multiselectlookup.cs new file mode 100644 index 0000000..9cae20f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Multiselectlookup.cs @@ -0,0 +1,228 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Multiselectlookup : Model + { + private string displayLabel; + private Modules.MinifiedModule linkingModule; + private Modules.MinifiedModule connectedModule; + private string lookupApiname; + private string apiName; + private string connectedfieldApiname; + private string connectedlookupApiname; + private long? id; + private bool? recordAccess; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public Modules.MinifiedModule LinkingModule + { + /// The method to get the linkingModule + /// Instance of MinifiedModule + get + { + return this.linkingModule; + + } + /// The method to set the value to linkingModule + /// Instance of MinifiedModule + set + { + this.linkingModule=value; + + this.keyModified["linking_module"] = 1; + + } + } + + public Modules.MinifiedModule ConnectedModule + { + /// The method to get the connectedModule + /// Instance of MinifiedModule + get + { + return this.connectedModule; + + } + /// The method to set the value to connectedModule + /// Instance of MinifiedModule + set + { + this.connectedModule=value; + + this.keyModified["connected_module"] = 1; + + } + } + + public string LookupApiname + { + /// The method to get the lookupApiname + /// string representing the lookupApiname + get + { + return this.lookupApiname; + + } + /// The method to set the value to lookupApiname + /// string + set + { + this.lookupApiname=value; + + this.keyModified["lookup_apiname"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string ConnectedfieldApiname + { + /// The method to get the connectedfieldApiname + /// string representing the connectedfieldApiname + get + { + return this.connectedfieldApiname; + + } + /// The method to set the value to connectedfieldApiname + /// string + set + { + this.connectedfieldApiname=value; + + this.keyModified["connectedfield_apiname"] = 1; + + } + } + + public string ConnectedlookupApiname + { + /// The method to get the connectedlookupApiname + /// string representing the connectedlookupApiname + get + { + return this.connectedlookupApiname; + + } + /// The method to set the value to connectedlookupApiname + /// string + set + { + this.connectedlookupApiname=value; + + this.keyModified["connectedlookup_apiname"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? RecordAccess + { + /// The method to get the recordAccess + /// bool? representing the recordAccess + get + { + return this.recordAccess; + + } + /// The method to set the value to recordAccess + /// bool? + set + { + this.recordAccess=value; + + this.keyModified["record_access"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/OperationType.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/OperationType.cs new file mode 100644 index 0000000..60081bb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/OperationType.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class OperationType : Model + { + private bool? webUpdate; + private bool? apiCreate; + private bool? webCreate; + private bool? apiUpdate; + private Dictionary keyModified=new Dictionary(); + + public bool? WebUpdate + { + /// The method to get the webUpdate + /// bool? representing the webUpdate + get + { + return this.webUpdate; + + } + /// The method to set the value to webUpdate + /// bool? + set + { + this.webUpdate=value; + + this.keyModified["web_update"] = 1; + + } + } + + public bool? APICreate + { + /// The method to get the aPICreate + /// bool? representing the apiCreate + get + { + return this.apiCreate; + + } + /// The method to set the value to aPICreate + /// bool? + set + { + this.apiCreate=value; + + this.keyModified["api_create"] = 1; + + } + } + + public bool? WebCreate + { + /// The method to get the webCreate + /// bool? representing the webCreate + get + { + return this.webCreate; + + } + /// The method to set the value to webCreate + /// bool? + set + { + this.webCreate=value; + + this.keyModified["web_create"] = 1; + + } + } + + public bool? APIUpdate + { + /// The method to get the aPIUpdate + /// bool? representing the apiUpdate + get + { + return this.apiUpdate; + + } + /// The method to set the value to aPIUpdate + /// bool? + set + { + this.apiUpdate=value; + + this.keyModified["api_update"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/PickListValue.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/PickListValue.cs new file mode 100644 index 0000000..03b1491 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/PickListValue.cs @@ -0,0 +1,290 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class PickListValue : Model + { + private string colourCode; + private string actualValue; + private Choice type; + private long? id; + private int? sequenceNumber; + private string displayValue; + private int? probability; + private ForecastCategory forecastCategory; + private string expectedDataType; + private string sysRefName; + private string forecastType; + private List maps; + private Dictionary keyModified=new Dictionary(); + + public string ColourCode + { + /// The method to get the colourCode + /// string representing the colourCode + get + { + return this.colourCode; + + } + /// The method to set the value to colourCode + /// string + set + { + this.colourCode=value; + + this.keyModified["colour_code"] = 1; + + } + } + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public int? Probability + { + /// The method to get the probability + /// int? representing the probability + get + { + return this.probability; + + } + /// The method to set the value to probability + /// int? + set + { + this.probability=value; + + this.keyModified["probability"] = 1; + + } + } + + public ForecastCategory ForecastCategory + { + /// The method to get the forecastCategory + /// Instance of ForecastCategory + get + { + return this.forecastCategory; + + } + /// The method to set the value to forecastCategory + /// Instance of ForecastCategory + set + { + this.forecastCategory=value; + + this.keyModified["forecast_category"] = 1; + + } + } + + public string ExpectedDataType + { + /// The method to get the expectedDataType + /// string representing the expectedDataType + get + { + return this.expectedDataType; + + } + /// The method to set the value to expectedDataType + /// string + set + { + this.expectedDataType=value; + + this.keyModified["expected_data_type"] = 1; + + } + } + + public string SysRefName + { + /// The method to get the sysRefName + /// string representing the sysRefName + get + { + return this.sysRefName; + + } + /// The method to set the value to sysRefName + /// string + set + { + this.sysRefName=value; + + this.keyModified["sys_ref_name"] = 1; + + } + } + + public string ForecastType + { + /// The method to get the forecastType + /// string representing the forecastType + get + { + return this.forecastType; + + } + /// The method to set the value to forecastType + /// string + set + { + this.forecastType=value; + + this.keyModified["forecast_type"] = 1; + + } + } + + public List Maps + { + /// The method to get the maps + /// Instance of List + get + { + return this.maps; + + } + /// The method to set the value to maps + /// Instance of List + set + { + this.maps=value; + + this.keyModified["maps"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Private.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Private.cs new file mode 100644 index 0000000..b161c0c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Private.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Private : Model + { + private bool? restricted; + private string type; + private bool? export; + private Dictionary keyModified=new Dictionary(); + + public bool? Restricted + { + /// The method to get the restricted + /// bool? representing the restricted + get + { + return this.restricted; + + } + /// The method to set the value to restricted + /// bool? + set + { + this.restricted=value; + + this.keyModified["restricted"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public bool? Export + { + /// The method to get the export + /// bool? representing the export + get + { + return this.export; + + } + /// The method to set the value to export + /// bool? + set + { + this.export=value; + + this.keyModified["export"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Profile.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Profile.cs new file mode 100644 index 0000000..bd6712b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Profile.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Profile : Model + { + private string name; + private long? id; + private string permissionType; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string PermissionType + { + /// The method to get the permissionType + /// string representing the permissionType + get + { + return this.permissionType; + + } + /// The method to set the value to permissionType + /// string + set + { + this.permissionType=value; + + this.keyModified["permission_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/QueryDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/QueryDetails.cs new file mode 100644 index 0000000..208c634 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/QueryDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class QueryDetails : Model + { + private long? queryId; + private Criteria criteria; + private Dictionary keyModified=new Dictionary(); + + public long? QueryId + { + /// The method to get the queryId + /// long? representing the queryId + get + { + return this.queryId; + + } + /// The method to set the value to queryId + /// long? + set + { + this.queryId=value; + + this.keyModified["query_id"] = 1; + + } + } + + public Criteria Criteria + { + /// The method to get the criteria + /// Instance of Criteria + get + { + return this.criteria; + + } + /// The method to set the value to criteria + /// Instance of Criteria + set + { + this.criteria=value; + + this.keyModified["criteria"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ReferFromField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ReferFromField.cs new file mode 100644 index 0000000..0935b89 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ReferFromField.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class ReferFromField : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ResponseHandler.cs new file mode 100644 index 0000000..04d51e0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Fields +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ResponseWrapper.cs new file mode 100644 index 0000000..f531315 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List fields; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/RollupCriteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/RollupCriteria.cs new file mode 100644 index 0000000..0958232 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/RollupCriteria.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class RollupCriteria : Model + { + private string comparator; + private MinifiedField field; + private object value; + private Dictionary keyModified=new Dictionary(); + + public string Comparator + { + /// The method to get the comparator + /// string representing the comparator + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// string + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + public MinifiedField Field + { + /// The method to get the field + /// Instance of MinifiedField + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of MinifiedField + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/RollupSummary.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/RollupSummary.cs new file mode 100644 index 0000000..f7f4a71 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/RollupSummary.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class RollupSummary : Model + { + private string returnType; + private Expression expression; + private MinifiedField basedOnModule; + private MinifiedField relatedList; + private string rollupBasedOn; + private Dictionary keyModified=new Dictionary(); + + public string ReturnType + { + /// The method to get the returnType + /// string representing the returnType + get + { + return this.returnType; + + } + /// The method to set the value to returnType + /// string + set + { + this.returnType=value; + + this.keyModified["return_type"] = 1; + + } + } + + public Expression Expression + { + /// The method to get the expression + /// Instance of Expression + get + { + return this.expression; + + } + /// The method to set the value to expression + /// Instance of Expression + set + { + this.expression=value; + + this.keyModified["expression"] = 1; + + } + } + + public MinifiedField BasedOnModule + { + /// The method to get the basedOnModule + /// Instance of MinifiedField + get + { + return this.basedOnModule; + + } + /// The method to set the value to basedOnModule + /// Instance of MinifiedField + set + { + this.basedOnModule=value; + + this.keyModified["based_on_module"] = 1; + + } + } + + public MinifiedField RelatedList + { + /// The method to get the relatedList + /// Instance of MinifiedField + get + { + return this.relatedList; + + } + /// The method to set the value to relatedList + /// Instance of MinifiedField + set + { + this.relatedList=value; + + this.keyModified["related_list"] = 1; + + } + } + + public string RollupBasedOn + { + /// The method to get the rollupBasedOn + /// string representing the rollupBasedOn + get + { + return this.rollupBasedOn; + + } + /// The method to set the value to rollupBasedOn + /// string + set + { + this.rollupBasedOn=value; + + this.keyModified["rollup_based_on"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/SharingProperties.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/SharingProperties.cs new file mode 100644 index 0000000..bc755e9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/SharingProperties.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class SharingProperties : Model + { + private string schedulerStatus; + private bool? sharePreferenceEnabled; + private Choice sharePermission; + private Dictionary keyModified=new Dictionary(); + + public string SchedulerStatus + { + /// The method to get the schedulerStatus + /// string representing the schedulerStatus + get + { + return this.schedulerStatus; + + } + /// The method to set the value to schedulerStatus + /// string + set + { + this.schedulerStatus=value; + + this.keyModified["scheduler_status"] = 1; + + } + } + + public bool? SharePreferenceEnabled + { + /// The method to get the sharePreferenceEnabled + /// bool? representing the sharePreferenceEnabled + get + { + return this.sharePreferenceEnabled; + + } + /// The method to set the value to sharePreferenceEnabled + /// bool? + set + { + this.sharePreferenceEnabled=value; + + this.keyModified["share_preference_enabled"] = 1; + + } + } + + public Choice SharePermission + { + /// The method to get the sharePermission + /// Instance of Choice + get + { + return this.sharePermission; + + } + /// The method to set the value to sharePermission + /// Instance of Choice + set + { + this.sharePermission=value; + + this.keyModified["share_permission"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ShowFields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ShowFields.cs new file mode 100644 index 0000000..59b80f4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ShowFields.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class ShowFields : Model + { + private bool? showData; + private MinifiedField field; + private Dictionary keyModified=new Dictionary(); + + public bool? ShowData + { + /// The method to get the showData + /// bool? representing the showData + get + { + return this.showData; + + } + /// The method to set the value to showData + /// bool? + set + { + this.showData=value; + + this.keyModified["show_data"] = 1; + + } + } + + public MinifiedField Field + { + /// The method to get the field + /// Instance of MinifiedField + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of MinifiedField + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Subform.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Subform.cs new file mode 100644 index 0000000..ff5a54f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Subform.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Subform : Model + { + private string module; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Module + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/SuccessResponse.cs new file mode 100644 index 0000000..7954bb3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Textarea.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Textarea.cs new file mode 100644 index 0000000..ba0630e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Textarea.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Textarea : Model + { + private string type; + private Dictionary keyModified=new Dictionary(); + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Tooltip.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Tooltip.cs new file mode 100644 index 0000000..74ed50a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Tooltip.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Tooltip : Model + { + private string name; + private string value; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Unique.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Unique.cs new file mode 100644 index 0000000..9c7c532 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/Unique.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class Unique : Model + { + private string casesensitive; + private Dictionary keyModified=new Dictionary(); + + public string Casesensitive + { + /// The method to get the casesensitive + /// string representing the casesensitive + get + { + return this.casesensitive; + + } + /// The method to set the value to casesensitive + /// string + set + { + this.casesensitive=value; + + this.keyModified["casesensitive"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ViewType.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ViewType.cs new file mode 100644 index 0000000..d8000c5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Fields/ViewType.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Fields +{ + + public class ViewType : Model + { + private bool? view; + private bool? edit; + private bool? quickCreate; + private bool? create; + private Dictionary keyModified=new Dictionary(); + + public bool? View + { + /// The method to get the view + /// bool? representing the view + get + { + return this.view; + + } + /// The method to set the value to view + /// bool? + set + { + this.view=value; + + this.keyModified["view"] = 1; + + } + } + + public bool? Edit + { + /// The method to get the edit + /// bool? representing the edit + get + { + return this.edit; + + } + /// The method to set the value to edit + /// bool? + set + { + this.edit=value; + + this.keyModified["edit"] = 1; + + } + } + + public bool? QuickCreate + { + /// The method to get the quickCreate + /// bool? representing the quickCreate + get + { + return this.quickCreate; + + } + /// The method to set the value to quickCreate + /// bool? + set + { + this.quickCreate=value; + + this.keyModified["quick_create"] = 1; + + } + } + + public bool? Create + { + /// The method to get the create + /// bool? representing the create + get + { + return this.create; + + } + /// The method to set the value to create + /// bool? + set + { + this.create=value; + + this.keyModified[Constants.REQUEST_CATEGORY_CREATE] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/APIException.cs new file mode 100644 index 0000000..e1204b4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Files +{ + + public class APIException : Model, ActionHandler, ResponseHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionHandler.cs new file mode 100644 index 0000000..82f01e2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Files +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionResponse.cs new file mode 100644 index 0000000..610e150 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Files +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionWrapper.cs new file mode 100644 index 0000000..888a46c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Files +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/BodyWrapper.cs new file mode 100644 index 0000000..a0db243 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Files +{ + + public class BodyWrapper : Model + { + private List file; + private Dictionary keyModified=new Dictionary(); + + public List File + { + /// The method to get the file + /// Instance of List + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of List + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/FileBodyWrapper.cs new file mode 100644 index 0000000..ec94e11 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Files +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/FilesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/FilesOperations.cs new file mode 100644 index 0000000..1bf52c3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/FilesOperations.cs @@ -0,0 +1,82 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Files +{ + + public class FilesOperations + { + /// The method to upload files + /// Instance of BodyWrapper + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse UploadFiles(BodyWrapper request, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/files"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="multipart/form-data"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get file + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetFile(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/files"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/x-download"); + + + } + + + public static class UploadFilesParam + { + public static readonly Param TYPE=new Param("type", "com.zoho.crm.api.Files.UploadFilesParam"); + } + + + public static class UploadFilesHeader + { + } + + + public static class GetFileParam + { + public static readonly Param ID=new Param("id", "com.zoho.crm.api.Files.GetFileParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ResponseHandler.cs new file mode 100644 index 0000000..c5897b2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Files +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/SuccessResponse.cs new file mode 100644 index 0000000..f554f66 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Files/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Files +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/APIException.cs new file mode 100644 index 0000000..9f68729 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class APIException : Model, ResponseHandler, ActionHandler, ActionResponse + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionHandler.cs new file mode 100644 index 0000000..0e003c6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionResponse.cs new file mode 100644 index 0000000..dd8a0b0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionWrapper.cs new file mode 100644 index 0000000..618c62e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class ActionWrapper : Model, ActionHandler + { + private List merge; + private Dictionary keyModified=new Dictionary(); + + public List Merge + { + /// The method to get the merge + /// Instance of List + get + { + return this.merge; + + } + /// The method to set the value to merge + /// Instance of List + set + { + this.merge=value; + + this.keyModified["merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/BodyWrapper.cs new file mode 100644 index 0000000..58e9c60 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class BodyWrapper : Model + { + private List merge; + private Dictionary keyModified=new Dictionary(); + + public List Merge + { + /// The method to get the merge + /// Instance of List + get + { + return this.merge; + + } + /// The method to set the value to merge + /// Instance of List + set + { + this.merge=value; + + this.keyModified["merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/DataFields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/DataFields.cs new file mode 100644 index 0000000..a60e679 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/DataFields.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class DataFields : Model + { + private string apiName; + private List data; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["_data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/FindAndMergeOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/FindAndMergeOperations.cs new file mode 100644 index 0000000..b001676 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/FindAndMergeOperations.cs @@ -0,0 +1,100 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class FindAndMergeOperations + { + private long? masterrecordid; + private string module; + + /// /// Creates an instance of FindAndMergeOperations with the given parameters + /// string + /// long? + + public FindAndMergeOperations(string module, long? masterrecordid) + { + this.module=module; + + this.masterrecordid=masterrecordid; + + + } + + /// The method to get record merge + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetRecordMerge(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.masterrecordid.ToString()); + + apiPath=string.Concat(apiPath, "/actions/merge"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to merge records + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse MergeRecords(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.masterrecordid.ToString()); + + apiPath=string.Concat(apiPath, "/actions/merge"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetRecordMergeParam + { + public static readonly Param JOB_ID=new Param("job_id", "com.zoho.crm.api.FindAndMerge.GetRecordMergeParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ImageData.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ImageData.cs new file mode 100644 index 0000000..6be6ab0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ImageData.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class ImageData : Model + { + private long? id; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/MasterRecordFields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/MasterRecordFields.cs new file mode 100644 index 0000000..ae7acb2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/MasterRecordFields.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class MasterRecordFields : Model + { + private string apiName; + private List data; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["_data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/Merge.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/Merge.cs new file mode 100644 index 0000000..76b4a4e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/Merge.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class Merge : Model + { + private long? jobId; + private string status; + private List data; + private List masterRecordFields; + private Dictionary keyModified=new Dictionary(); + + public long? JobId + { + /// The method to get the jobId + /// long? representing the jobId + get + { + return this.jobId; + + } + /// The method to set the value to jobId + /// long? + set + { + this.jobId=value; + + this.keyModified["job_id"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public List MasterRecordFields + { + /// The method to get the masterRecordFields + /// Instance of List + get + { + return this.masterRecordFields; + + } + /// The method to set the value to masterRecordFields + /// Instance of List + set + { + this.masterRecordFields=value; + + this.keyModified["master_record_fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/MergeData.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/MergeData.cs new file mode 100644 index 0000000..9ac20ab --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/MergeData.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class MergeData : Model + { + private List fields; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["_fields"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ResponseHandler.cs new file mode 100644 index 0000000..8a77bdf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ResponseWrapper.cs new file mode 100644 index 0000000..d0a2d0b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List merge; + private Dictionary keyModified=new Dictionary(); + + public List Merge + { + /// The method to get the merge + /// Instance of List + get + { + return this.merge; + + } + /// The method to set the value to merge + /// Instance of List + set + { + this.merge=value; + + this.keyModified["merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/SuccessResponse.cs new file mode 100644 index 0000000..6442ade --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FindAndMerge/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FindAndMerge +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/APIException.cs new file mode 100644 index 0000000..65d8973 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionHandler.cs new file mode 100644 index 0000000..63e4580 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionResponse.cs new file mode 100644 index 0000000..b39b417 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionWrapper.cs new file mode 100644 index 0000000..922ddbf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public class ActionWrapper : Model, ActionHandler + { + private ActionResponse fiscalYear; + private Dictionary keyModified=new Dictionary(); + + public ActionResponse FiscalYear + { + /// The method to get the fiscalYear + /// Instance of ActionResponse + get + { + return this.fiscalYear; + + } + /// The method to set the value to fiscalYear + /// Instance of ActionResponse + set + { + this.fiscalYear=value; + + this.keyModified["fiscal_year"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/BodyWrapper.cs new file mode 100644 index 0000000..f1a6ad6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public class BodyWrapper : Model + { + private Year fiscalYear; + private Dictionary keyModified=new Dictionary(); + + public Year FiscalYear + { + /// The method to get the fiscalYear + /// Instance of Year + get + { + return this.fiscalYear; + + } + /// The method to set the value to fiscalYear + /// Instance of Year + set + { + this.fiscalYear=value; + + this.keyModified["fiscal_year"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/FiscalYearOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/FiscalYearOperations.cs new file mode 100644 index 0000000..a9d41d9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/FiscalYearOperations.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public class FiscalYearOperations + { + /// The method to get fiscal year + /// Instance of APIResponse + public APIResponse GetFiscalYear() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fiscal_year"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update fiscal year + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateFiscalYear(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fiscal_year"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ResponseHandler.cs new file mode 100644 index 0000000..487b6d6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ResponseWrapper.cs new file mode 100644 index 0000000..bdc2e5a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private Year fiscalYear; + private Dictionary keyModified=new Dictionary(); + + public Year FiscalYear + { + /// The method to get the fiscalYear + /// Instance of Year + get + { + return this.fiscalYear; + + } + /// The method to set the value to fiscalYear + /// Instance of Year + set + { + this.fiscalYear=value; + + this.keyModified["fiscal_year"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/SuccessResponse.cs new file mode 100644 index 0000000..1762600 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/Year.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/Year.cs new file mode 100644 index 0000000..8bad60e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FiscalYear/Year.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FiscalYear +{ + + public class Year : Model + { + private Choice startMonth; + private Choice displayBasedOn; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public Choice StartMonth + { + /// The method to get the startMonth + /// Instance of Choice + get + { + return this.startMonth; + + } + /// The method to set the value to startMonth + /// Instance of Choice + set + { + this.startMonth=value; + + this.keyModified["start_month"] = 1; + + } + } + + public Choice DisplayBasedOn + { + /// The method to get the displayBasedOn + /// Instance of Choice + get + { + return this.displayBasedOn; + + } + /// The method to set the value to displayBasedOn + /// Instance of Choice + set + { + this.displayBasedOn=value; + + this.keyModified["display_based_on"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/APIException.cs new file mode 100644 index 0000000..5afc437 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FromAddresses +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/Address.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/Address.cs new file mode 100644 index 0000000..c74e51a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/Address.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FromAddresses +{ + + public class Address : Model + { + private string email; + private string type; + private long? id; + private string userName; + private bool? default1; + private Dictionary keyModified=new Dictionary(); + + public string Email + { + /// The method to get the email + /// string representing the email + get + { + return this.email; + + } + /// The method to set the value to email + /// string + set + { + this.email=value; + + this.keyModified["email"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string UserName + { + /// The method to get the userName + /// string representing the userName + get + { + return this.userName; + + } + /// The method to set the value to userName + /// string + set + { + this.userName=value; + + this.keyModified["user_name"] = 1; + + } + } + + public bool? Default + { + /// The method to get the default + /// bool? representing the default1 + get + { + return this.default1; + + } + /// The method to set the value to default + /// bool? + set + { + this.default1=value; + + this.keyModified["default"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/FromAddressesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/FromAddressesOperations.cs new file mode 100644 index 0000000..70bffd4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/FromAddressesOperations.cs @@ -0,0 +1,31 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.FromAddresses +{ + + public class FromAddressesOperations + { + /// The method to get from addresses + /// Instance of APIResponse + public APIResponse GetFromAddresses() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/emails/actions/from_addresses"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/ResponseHandler.cs new file mode 100644 index 0000000..3115472 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.FromAddresses +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/ResponseWrapper.cs new file mode 100644 index 0000000..2cd19f1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/FromAddresses/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.FromAddresses +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List
fromAddresses; + private Dictionary keyModified=new Dictionary(); + + public List
FromAddresses + { + /// The method to get the fromAddresses + /// Instance of List
+ get + { + return this.fromAddresses; + + } + /// The method to set the value to fromAddresses + /// Instance of List
+ set + { + this.fromAddresses=value; + + this.keyModified["from_addresses"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/APIException.cs new file mode 100644 index 0000000..724bbd4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Functions +{ + + public class APIException : Model, ResponseWrapper + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/BodyWrapper.cs new file mode 100644 index 0000000..0e4845e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Functions +{ + + public class BodyWrapper : Model + { + private Dictionary body; + private Dictionary keyModified=new Dictionary(); + + public Dictionary Body + { + /// The method to get the body + /// Dictionary representing the body + get + { + return this.body; + + } + /// The method to set the value to body + /// Dictionary + set + { + this.body=value; + + this.keyModified["body"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/FileBodyWrapper.cs new file mode 100644 index 0000000..da6f9f8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Functions +{ + + public class FileBodyWrapper : Model + { + private StreamWrapper inputfile; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper Inputfile + { + /// The method to get the inputfile + /// Instance of StreamWrapper + get + { + return this.inputfile; + + } + /// The method to set the value to inputfile + /// Instance of StreamWrapper + set + { + this.inputfile=value; + + this.keyModified["inputFile"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/FunctionsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/FunctionsOperations.cs new file mode 100644 index 0000000..8a462fe --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/FunctionsOperations.cs @@ -0,0 +1,186 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Functions +{ + + public class FunctionsOperations + { + private string authType; + private string functionName; + private Dictionary arguments; + + /// /// Creates an instance of FunctionsOperations with the given parameters + /// string + /// string + /// Dictionary + + public FunctionsOperations(string functionName, string authType, Dictionary arguments) + { + this.functionName=functionName; + + this.authType=authType; + + this.arguments=arguments; + + + } + + /// The method to execute function using request body + /// Instance of BodyWrapper + /// Instance of ParameterMap + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse ExecuteFunctionUsingRequestBody(BodyWrapper request, ParameterMap paramInstance, HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/functions/"); + + apiPath=string.Concat(apiPath, this.functionName.ToString()); + + apiPath=string.Concat(apiPath, "/actions/execute"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("auth_type", "com.zoho.crm.api.Functions.ExecuteFunctionUsingRequestBodyParam"), this.authType); + + handlerInstance.AddParam(new Param>("arguments", "com.zoho.crm.api.Functions.ExecuteFunctionUsingRequestBodyParam"), this.arguments); + + handlerInstance.Param=paramInstance; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ResponseWrapper), "application/json"); + + + } + + /// The method to execute function using parameters + /// Instance of ParameterMap + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse ExecuteFunctionUsingParameters(ParameterMap paramInstance, HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/functions/"); + + apiPath=string.Concat(apiPath, this.functionName.ToString()); + + apiPath=string.Concat(apiPath, "/actions/execute"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("auth_type", "com.zoho.crm.api.Functions.ExecuteFunctionUsingParametersParam"), this.authType); + + handlerInstance.AddParam(new Param>("arguments", "com.zoho.crm.api.Functions.ExecuteFunctionUsingParametersParam"), this.arguments); + + handlerInstance.Param=paramInstance; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ResponseWrapper), "application/json"); + + + } + + /// The method to execute function using file + /// Instance of FileBodyWrapper + /// Instance of ParameterMap + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse ExecuteFunctionUsingFile(FileBodyWrapper request, ParameterMap paramInstance, HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/functions/"); + + apiPath=string.Concat(apiPath, this.functionName.ToString()); + + apiPath=string.Concat(apiPath, "/actions/execute"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="multipart/form-data"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("auth_type", "com.zoho.crm.api.Functions.ExecuteFunctionUsingFileParam"), this.authType); + + handlerInstance.AddParam(new Param>("arguments", "com.zoho.crm.api.Functions.ExecuteFunctionUsingFileParam"), this.arguments); + + handlerInstance.Param=paramInstance; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ResponseWrapper), "application/json"); + + + } + + + public static class ExecuteFunctionUsingRequestBodyParam + { + public static readonly Param> CUSTOM_FUNCTIONS_PARAM=new Param>("custom_functions_param", "com.zoho.crm.api.Functions.ExecuteFunctionUsingRequestBodyParam"); + } + + + public static class ExecuteFunctionUsingRequestBodyHeader + { + public static readonly Header> CUSTOM_FUNCTIONS_HEADER=new Header>("custom_functions_header", "com.zoho.crm.api.Functions.ExecuteFunctionUsingRequestBodyHeader"); + } + + + public static class ExecuteFunctionUsingParametersParam + { + public static readonly Param> GET_CUSTOM_FUNCTIONS_PARAM=new Param>("get_custom_functions_param", "com.zoho.crm.api.Functions.ExecuteFunctionUsingParametersParam"); + } + + + public static class ExecuteFunctionUsingParametersHeader + { + public static readonly Header> GET_CUSTOM_FUNCTIONS_HEADER=new Header>("get_custom_functions_header", "com.zoho.crm.api.Functions.ExecuteFunctionUsingParametersHeader"); + } + + + public static class ExecuteFunctionUsingFileParam + { + public static readonly Param> UPLOAD_FILE_PARAM=new Param>("upload_file_param", "com.zoho.crm.api.Functions.ExecuteFunctionUsingFileParam"); + } + + + public static class ExecuteFunctionUsingFileHeader + { + public static readonly Header> UPLOAD_FILE_HEADER=new Header>("upload_file_header", "com.zoho.crm.api.Functions.ExecuteFunctionUsingFileHeader"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/ResponseWrapper.cs new file mode 100644 index 0000000..f41f154 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/ResponseWrapper.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Functions +{ + + public interface ResponseWrapper + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/SuccessResponse.cs new file mode 100644 index 0000000..ca14fdf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Functions/SuccessResponse.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Functions +{ + + public class SuccessResponse : Model, ResponseWrapper + { + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/APIException.cs new file mode 100644 index 0000000..58f861b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class APIException : ActionResponse, Model, ResponseHandler, ActionHandler, ReplaceActionHandler, ReplaceActionResponse, ReplacedResponseHandler, AssociationsResponseHandler, PickListValuesAssociationsResponseHandler + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionHandler.cs new file mode 100644 index 0000000..ac009d6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionResponse.cs new file mode 100644 index 0000000..2802213 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionWrapper.cs new file mode 100644 index 0000000..b4f1e2d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ActionWrapper : Model, ActionHandler + { + private List globalPicklists; + private Dictionary keyModified=new Dictionary(); + + public List GlobalPicklists + { + /// The method to get the globalPicklists + /// Instance of List + get + { + return this.globalPicklists; + + } + /// The method to set the value to globalPicklists + /// Instance of List + set + { + this.globalPicklists=value; + + this.keyModified["global_picklists"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Association.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Association.cs new file mode 100644 index 0000000..1fb0244 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Association.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class Association : Model + { + private Field field; + private Module module; + private List layouts; + private Dictionary keyModified=new Dictionary(); + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public List Layouts + { + /// The method to get the layouts + /// Instance of List + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of List + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/AssociationsResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/AssociationsResponseHandler.cs new file mode 100644 index 0000000..db6225f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/AssociationsResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface AssociationsResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/AssociationsResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/AssociationsResponseWrapper.cs new file mode 100644 index 0000000..2945c29 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/AssociationsResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class AssociationsResponseWrapper : Model, AssociationsResponseHandler + { + private List associations; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Associations + { + /// The method to get the associations + /// Instance of List + get + { + return this.associations; + + } + /// The method to set the value to associations + /// Instance of List + set + { + this.associations=value; + + this.keyModified["associations"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/BodyWrapper.cs new file mode 100644 index 0000000..15117fa --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class BodyWrapper : Model + { + private List globalPicklists; + private Dictionary keyModified=new Dictionary(); + + public List GlobalPicklists + { + /// The method to get the globalPicklists + /// Instance of List + get + { + return this.globalPicklists; + + } + /// The method to set the value to globalPicklists + /// Instance of List + set + { + this.globalPicklists=value; + + this.keyModified["global_picklists"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Field.cs new file mode 100644 index 0000000..ef7c6a8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Field.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class Field : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/GlobalPicklistsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/GlobalPicklistsOperations.cs new file mode 100644 index 0000000..1ed9ed2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/GlobalPicklistsOperations.cs @@ -0,0 +1,343 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class GlobalPicklistsOperations + { + /// The method to get global picklists + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetGlobalPicklists(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create global picklist + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateGlobalPicklist(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update global picklists + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateGlobalPicklists(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PATCH; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete global picklists + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse DeleteGlobalPicklists(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get global picklist + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetGlobalPicklist(long? id, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update global picklist + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateGlobalPicklist(long? id, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete global picklist + /// long? + /// Instance of APIResponse + public APIResponse DeleteGlobalPicklist(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to replace picklist values + /// long? + /// Instance of ReplaceBodyWrapper + /// Instance of APIResponse + public APIResponse ReplacePicklistValues(long? id, ReplaceBodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/replace_picklist_values"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ReplaceActionHandler), "application/json"); + + + } + + /// The method to get replace values + /// long? + /// Instance of APIResponse + public APIResponse GetReplaceValues(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/replaced_values"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + return handlerInstance.APICall(typeof(ReplacedResponseHandler), "application/json"); + + + } + + /// The method to get associations + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetAssociations(long? id, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/associations"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(AssociationsResponseHandler), "application/json"); + + + } + + /// The method to get pick list value associations + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetPickListValueAssociations(long? id, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/global_picklists/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/pick_list_values_associations"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(PickListValuesAssociationsResponseHandler), "application/json"); + + + } + + + public static class GetGlobalPicklistsParam + { + public static readonly Param INCLUDE=new Param("include", "com.zoho.crm.api.GlobalPicklists.GetGlobalPicklistsParam"); + public static readonly Param INCLUDE_INNER_DETAILS=new Param("include_inner_details", "com.zoho.crm.api.GlobalPicklists.GetGlobalPicklistsParam"); + } + + + public static class DeleteGlobalPicklistsParam + { + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.GlobalPicklists.DeleteGlobalPicklistsParam"); + } + + + public static class GetGlobalPicklistParam + { + public static readonly Param INCLUDE=new Param("include", "com.zoho.crm.api.GlobalPicklists.GetGlobalPicklistParam"); + public static readonly Param INCLUDE_INNER_DETAILS=new Param("include_inner_details", "com.zoho.crm.api.GlobalPicklists.GetGlobalPicklistParam"); + } + + + public static class GetAssociationsParam + { + public static readonly Param INCLUDE_INNER_DETAILS=new Param("include_inner_details", "com.zoho.crm.api.GlobalPicklists.GetAssociationsParam"); + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.GlobalPicklists.GetAssociationsParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.GlobalPicklists.GetAssociationsParam"); + } + + + public static class GetPickListValueAssociationsParam + { + public static readonly Param PICKLIST_VALUE_ID=new Param("picklist_value_id", "com.zoho.crm.api.GlobalPicklists.GetPickListValueAssociationsParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Info.cs new file mode 100644 index 0000000..757c435 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class Info : Model + { + private int? perPage; + private int? count; + private int? page; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Layout.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Layout.cs new file mode 100644 index 0000000..906c97c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Layout.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class Layout : Model + { + private string name; + private long? id; + private string status; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Module.cs new file mode 100644 index 0000000..1484f76 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Module.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class Module : Model + { + private string pluralLabel; + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string PluralLabel + { + /// The method to get the pluralLabel + /// string representing the pluralLabel + get + { + return this.pluralLabel; + + } + /// The method to set the value to pluralLabel + /// string + set + { + this.pluralLabel=value; + + this.keyModified["plural_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValues.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValues.cs new file mode 100644 index 0000000..c31956e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValues.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class PickListValues : Model + { + private string actualValue; + private Choice type; + private long? id; + private int? sequenceNumber; + private string displayValue; + private Dictionary keyModified=new Dictionary(); + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociation.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociation.cs new file mode 100644 index 0000000..f9f4749 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociation.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class PickListValuesAssociation : Model + { + private string type; + private List resources; + private Dictionary keyModified=new Dictionary(); + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public List Resources + { + /// The method to get the resources + /// Instance of List + get + { + return this.resources; + + } + /// The method to set the value to resources + /// Instance of List + set + { + this.resources=value; + + this.keyModified["resources"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociationsResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociationsResponseHandler.cs new file mode 100644 index 0000000..8333348 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociationsResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface PickListValuesAssociationsResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociationsResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociationsResponseWrapper.cs new file mode 100644 index 0000000..714e7a5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/PickListValuesAssociationsResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class PickListValuesAssociationsResponseWrapper : Model, PickListValuesAssociationsResponseHandler + { + private List pickListValuesAssociations; + private Dictionary keyModified=new Dictionary(); + + public List PickListValuesAssociations + { + /// The method to get the pickListValuesAssociations + /// Instance of List + get + { + return this.pickListValuesAssociations; + + } + /// The method to set the value to pickListValuesAssociations + /// Instance of List + set + { + this.pickListValuesAssociations=value; + + this.keyModified["pick_list_values_associations"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Picklist.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Picklist.cs new file mode 100644 index 0000000..5d5e663 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Picklist.cs @@ -0,0 +1,292 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class Picklist : Model + { + private string displayLabel; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private long? id; + private string apiName; + private string actualLabel; + private string description; + private Users.MinifiedUser modifiedBy; + private Users.MinifiedUser createdBy; + private bool? presence; + private bool? pickListValuesSortedLexically; + private List pickListValues; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string ActualLabel + { + /// The method to get the actualLabel + /// string representing the actualLabel + get + { + return this.actualLabel; + + } + /// The method to set the value to actualLabel + /// string + set + { + this.actualLabel=value; + + this.keyModified["actual_label"] = 1; + + } + } + + public string Description + { + /// The method to get the description + /// string representing the description + get + { + return this.description; + + } + /// The method to set the value to description + /// string + set + { + this.description=value; + + this.keyModified["description"] = 1; + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public bool? Presence + { + /// The method to get the presence + /// bool? representing the presence + get + { + return this.presence; + + } + /// The method to set the value to presence + /// bool? + set + { + this.presence=value; + + this.keyModified["presence"] = 1; + + } + } + + public bool? PickListValuesSortedLexically + { + /// The method to get the pickListValuesSortedLexically + /// bool? representing the pickListValuesSortedLexically + get + { + return this.pickListValuesSortedLexically; + + } + /// The method to set the value to pickListValuesSortedLexically + /// bool? + set + { + this.pickListValuesSortedLexically=value; + + this.keyModified["pick_list_values_sorted_lexically"] = 1; + + } + } + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionHandler.cs new file mode 100644 index 0000000..2d126a7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface ReplaceActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionResponse.cs new file mode 100644 index 0000000..3ae6531 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface ReplaceActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionWrapper.cs new file mode 100644 index 0000000..6cca182 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ReplaceActionWrapper : Model, ReplaceActionHandler + { + private List replacePicklistValues; + private Dictionary keyModified=new Dictionary(); + + public List ReplacePicklistValues + { + /// The method to get the replacePicklistValues + /// Instance of List + get + { + return this.replacePicklistValues; + + } + /// The method to set the value to replacePicklistValues + /// Instance of List + set + { + this.replacePicklistValues=value; + + this.keyModified["replace_picklist_values"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceBodyWrapper.cs new file mode 100644 index 0000000..99db39b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ReplaceBodyWrapper : Model + { + private List replacePicklistValues; + private Dictionary keyModified=new Dictionary(); + + public List ReplacePicklistValues + { + /// The method to get the replacePicklistValues + /// Instance of List + get + { + return this.replacePicklistValues; + + } + /// The method to set the value to replacePicklistValues + /// Instance of List + set + { + this.replacePicklistValues=value; + + this.keyModified["replace_picklist_values"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacePicklistValue.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacePicklistValue.cs new file mode 100644 index 0000000..4211e34 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacePicklistValue.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ReplacePicklistValue : Model + { + private long? id; + private string displayValue; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacePicklistValues.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacePicklistValues.cs new file mode 100644 index 0000000..96e920b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacePicklistValues.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ReplacePicklistValues : Model + { + private ReplacePicklistValue newValue; + private ReplacePicklistValue oldValue; + private Dictionary keyModified=new Dictionary(); + + public ReplacePicklistValue NewValue + { + /// The method to get the newValue + /// Instance of ReplacePicklistValue + get + { + return this.newValue; + + } + /// The method to set the value to newValue + /// Instance of ReplacePicklistValue + set + { + this.newValue=value; + + this.keyModified["new_value"] = 1; + + } + } + + public ReplacePicklistValue OldValue + { + /// The method to get the oldValue + /// Instance of ReplacePicklistValue + get + { + return this.oldValue; + + } + /// The method to set the value to oldValue + /// Instance of ReplacePicklistValue + set + { + this.oldValue=value; + + this.keyModified["old_value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceSuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceSuccessResponse.cs new file mode 100644 index 0000000..fffcd8b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplaceSuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ReplaceSuccessResponse : Model, ReplaceActionResponse + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedResponseHandler.cs new file mode 100644 index 0000000..d59b74e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface ReplacedResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedResponseWrapper.cs new file mode 100644 index 0000000..313e8dd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ReplacedResponseWrapper : Model, ReplacedResponseHandler + { + private List replacedValues; + private Dictionary keyModified=new Dictionary(); + + public List ReplacedValues + { + /// The method to get the replacedValues + /// Instance of List + get + { + return this.replacedValues; + + } + /// The method to set the value to replacedValues + /// Instance of List + set + { + this.replacedValues=value; + + this.keyModified["replaced_values"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedValue.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedValue.cs new file mode 100644 index 0000000..a4cf242 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ReplacedValue.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ReplacedValue : Model + { + private string displayValue; + private string actualValue; + private Dictionary keyModified=new Dictionary(); + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Resource.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Resource.cs new file mode 100644 index 0000000..0ea7f9c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/Resource.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class Resource : Model + { + private long? id; + private string name; + private List details; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public List Details + { + /// The method to get the details + /// Instance of List + get + { + return this.details; + + } + /// The method to set the value to details + /// Instance of List + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ResponseHandler.cs new file mode 100644 index 0000000..8c82549 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ResponseWrapper.cs new file mode 100644 index 0000000..12be8f5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List globalPicklists; + private Dictionary keyModified=new Dictionary(); + + public List GlobalPicklists + { + /// The method to get the globalPicklists + /// Instance of List + get + { + return this.globalPicklists; + + } + /// The method to set the value to globalPicklists + /// Instance of List + set + { + this.globalPicklists=value; + + this.keyModified["global_picklists"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/SuccessResponse.cs new file mode 100644 index 0000000..86d1343 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/GlobalPicklists/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.GlobalPicklists +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Header.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Header.cs new file mode 100644 index 0000000..bc3b4a9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Header.cs @@ -0,0 +1,47 @@ +namespace Com.Zoho.Crm.API +{ + /// + /// This class represents the HTTP header. + /// + /// A CSharp DataType + public class Header + { + private string name; + private string className; + + /// + /// Creates an Header class instance with the specified header name. + /// + /// A string containing the header name. + /// A string containing the header class name. + public Header(string name, string className) + { + this.name = name; + this.className = className; + } + + /// + /// This is a getter method to get header name. + /// + /// A string representing the header name. + public string Name + { + get + { + return this.name; + } + } + + /// + /// This is a getter method to get header class name. + /// + /// A string representing the header class name. + public string ClassName + { + get + { + return this.className; + } + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HeaderMap.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HeaderMap.cs new file mode 100644 index 0000000..94ed1ce --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HeaderMap.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Com.Zoho.API.Exception; +using Com.Zoho.Crm.API.Logger; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Com.Zoho.Crm.API +{ + /// + /// This class represents the HTTP header name and value. + /// + public class HeaderMap + { + private Dictionary headerMap = new Dictionary(); + + /// + /// This is a getter method to get header map. + /// + /// A Dictionary<string, string> representing the API response headers. + public Dictionary HeaderMaps + { + get + { + return headerMap; + } + } + + /// + /// This method is to add header name and value. + /// + /// A T containing the specified data type. + /// A Header<T> class instance. + /// A T containing the header value. + public void Add(Header header, T value) + { + if(header == null) + { + throw new SDKException(Constants.HEADER_NULL_ERROR, Constants.HEADER_INSTANCE_NULL_ERROR); + } + string headerName = header.Name; + if(headerName == null) + { + throw new SDKException(Constants.HEADER_NAME_NULL_ERROR, Constants.HEADER_NAME_NULL_ERROR_MESSAGE); + } + if(value == null) + { + throw new SDKException(Constants.HEADER_NULL_ERROR, headerName + Constants.NULL_VALUE_ERROR_MESSAGE); + } + try + { + string headerClassName = header.ClassName; + string parsedHeaderValue; + if (headerClassName != null) + { + HeaderParamValidator headerParamValidator = new HeaderParamValidator(); + parsedHeaderValue = headerParamValidator.Validate(headerName, headerClassName, value); + } + else + { + try + { + string type = value.GetType().FullName; + Type dataTypeConverter = Type.GetType(Constants.DATATYPECONVERTER.Replace(Constants._TYPE, type)); + MethodInfo method = dataTypeConverter.GetMethod(Constants.POST_CONVERT); + parsedHeaderValue = (string)(method.Invoke(null, new object[] { value, type })); + if (value is bool) + { + parsedHeaderValue = parsedHeaderValue.ToLower(); + } + } + catch (Exception) + { + parsedHeaderValue = value.ToString(); + } + } + if (headerMap.ContainsKey(headerName) && !string.IsNullOrEmpty(headerMap[headerName])) + { + string existingHeaderValue = this.headerMap[headerName]; + existingHeaderValue = existingHeaderValue + "," + parsedHeaderValue.ToString(); + headerMap[headerName] = existingHeaderValue; + } + else + { + headerMap[headerName] = parsedHeaderValue.ToString(); + } + } + catch (SDKException e) + { + SDKLogger.LogError(Constants.HEADER_EXCEPTION + JsonConvert.SerializeObject(e)); + throw e; + } + catch (Exception e) + { + SDKException exception = new SDKException(e); + SDKLogger.LogError(Constants.HEADER_EXCEPTION + JsonConvert.SerializeObject(exception)); + throw exception; + } + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/APIException.cs new file mode 100644 index 0000000..c0628ce --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public class APIException : ActionResponse, Model + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionHandler.cs new file mode 100644 index 0000000..fef25ea --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionResponse.cs new file mode 100644 index 0000000..79b7e4e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionWrapper.cs new file mode 100644 index 0000000..3237025 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public class ActionWrapper : Model + { + private ActionResponse hipaaCompliance; + private Dictionary keyModified=new Dictionary(); + + public ActionResponse HipaaCompliance + { + /// The method to get the hipaaCompliance + /// Instance of ActionResponse + get + { + return this.hipaaCompliance; + + } + /// The method to set the value to hipaaCompliance + /// Instance of ActionResponse + set + { + this.hipaaCompliance=value; + + this.keyModified["hipaa_compliance"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/HipaaCompliance.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/HipaaCompliance.cs new file mode 100644 index 0000000..8c27257 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/HipaaCompliance.cs @@ -0,0 +1,164 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public class HipaaCompliance : Model + { + private bool? enabled; + private List enabledForModules; + private bool? restrictToZohoApps; + private bool? restrictDataAccessThroughAPI; + private bool? restrictDataInExport; + private List restrictToThirdPartyApps; + private Dictionary keyModified=new Dictionary(); + + public bool? Enabled + { + /// The method to get the enabled + /// bool? representing the enabled + get + { + return this.enabled; + + } + /// The method to set the value to enabled + /// bool? + set + { + this.enabled=value; + + this.keyModified["enabled"] = 1; + + } + } + + public List EnabledForModules + { + /// The method to get the enabledForModules + /// Instance of List + get + { + return this.enabledForModules; + + } + /// The method to set the value to enabledForModules + /// Instance of List + set + { + this.enabledForModules=value; + + this.keyModified["enabled_for_modules"] = 1; + + } + } + + public bool? RestrictToZohoApps + { + /// The method to get the restrictToZohoApps + /// bool? representing the restrictToZohoApps + get + { + return this.restrictToZohoApps; + + } + /// The method to set the value to restrictToZohoApps + /// bool? + set + { + this.restrictToZohoApps=value; + + this.keyModified["restrict_to_zoho_apps"] = 1; + + } + } + + public bool? RestrictDataAccessThroughAPI + { + /// The method to get the restrictDataAccessThroughAPI + /// bool? representing the restrictDataAccessThroughAPI + get + { + return this.restrictDataAccessThroughAPI; + + } + /// The method to set the value to restrictDataAccessThroughAPI + /// bool? + set + { + this.restrictDataAccessThroughAPI=value; + + this.keyModified["restrict_data_access_through_api"] = 1; + + } + } + + public bool? RestrictDataInExport + { + /// The method to get the restrictDataInExport + /// bool? representing the restrictDataInExport + get + { + return this.restrictDataInExport; + + } + /// The method to set the value to restrictDataInExport + /// bool? + set + { + this.restrictDataInExport=value; + + this.keyModified["restrict_data_in_export"] = 1; + + } + } + + public List RestrictToThirdPartyApps + { + /// The method to get the restrictToThirdPartyApps + /// Instance of List + get + { + return this.restrictToThirdPartyApps; + + } + /// The method to set the value to restrictToThirdPartyApps + /// Instance of List + set + { + this.restrictToThirdPartyApps=value; + + this.keyModified["restrict_to_third_party_apps"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/Modules.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/Modules.cs new file mode 100644 index 0000000..18b81a8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/Modules.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public class Modules : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ResponseWrapper.cs new file mode 100644 index 0000000..4798752 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public class ResponseWrapper : Model + { + private HipaaCompliance hipaaCompliance; + private Dictionary keyModified=new Dictionary(); + + public HipaaCompliance HipaaCompliance + { + /// The method to get the hipaaCompliance + /// Instance of HipaaCompliance + get + { + return this.hipaaCompliance; + + } + /// The method to set the value to hipaaCompliance + /// Instance of HipaaCompliance + set + { + this.hipaaCompliance=value; + + this.keyModified["hipaa_compliance"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/SuccessResponse.cs new file mode 100644 index 0000000..0b0a178 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/HipaaCompliance/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.HipaaCompliance +{ + + public class SuccessResponse : Model, ActionHandler + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/APIException.cs new file mode 100644 index 0000000..9bf5be7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class APIException : Model, ResponseHandler, ActionHandler, ActionResponse, ResonseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionHandler.cs new file mode 100644 index 0000000..a5d80a5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Holidays +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionResponse.cs new file mode 100644 index 0000000..c8de422 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Holidays +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionWrapper.cs new file mode 100644 index 0000000..c787e69 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class ActionWrapper : Model, ActionHandler + { + private List holidays; + private Dictionary keyModified=new Dictionary(); + + public List Holidays + { + /// The method to get the holidays + /// Instance of List + get + { + return this.holidays; + + } + /// The method to set the value to holidays + /// Instance of List + set + { + this.holidays=value; + + this.keyModified["holidays"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/BodyWrapper.cs new file mode 100644 index 0000000..5f41bbf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/BodyWrapper.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Holidays +{ + + public interface BodyWrapper + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/BusinessHoliday.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/BusinessHoliday.cs new file mode 100644 index 0000000..d44791a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/BusinessHoliday.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class BusinessHoliday : Model + { + private string name; + private DateTime? date; + private string type; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public DateTime? Date + { + /// The method to get the date + /// DateTime? representing the date + get + { + return this.date; + + } + /// The method to set the value to date + /// DateTime? + set + { + this.date=value; + + this.keyModified["date"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/CreateBusinessHoliday.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/CreateBusinessHoliday.cs new file mode 100644 index 0000000..99797d0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/CreateBusinessHoliday.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class CreateBusinessHoliday : Model, BodyWrapper + { + private List holidays; + private Dictionary keyModified=new Dictionary(); + + public List Holidays + { + /// The method to get the holidays + /// Instance of List + get + { + return this.holidays; + + } + /// The method to set the value to holidays + /// Instance of List + set + { + this.holidays=value; + + this.keyModified["holidays"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/CreateShiftHoliday.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/CreateShiftHoliday.cs new file mode 100644 index 0000000..51ddc68 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/CreateShiftHoliday.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class CreateShiftHoliday : Model, BodyWrapper + { + private List holidays; + private Dictionary keyModified=new Dictionary(); + + public List Holidays + { + /// The method to get the holidays + /// Instance of List + get + { + return this.holidays; + + } + /// The method to set the value to holidays + /// Instance of List + set + { + this.holidays=value; + + this.keyModified["holidays"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Holiday.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Holiday.cs new file mode 100644 index 0000000..4d5cfd5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Holiday.cs @@ -0,0 +1,165 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class Holiday : Model + { + private int? year; + private string name; + private DateTime? date; + private string type; + private long? id; + private ShiftHour shiftHour; + private Dictionary keyModified=new Dictionary(); + + public int? Year + { + /// The method to get the year + /// int? representing the year + get + { + return this.year; + + } + /// The method to set the value to year + /// int? + set + { + this.year=value; + + this.keyModified["year"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public DateTime? Date + { + /// The method to get the date + /// DateTime? representing the date + get + { + return this.date; + + } + /// The method to set the value to date + /// DateTime? + set + { + this.date=value; + + this.keyModified["date"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public ShiftHour ShiftHour + { + /// The method to get the shiftHour + /// Instance of ShiftHour + get + { + return this.shiftHour; + + } + /// The method to set the value to shiftHour + /// Instance of ShiftHour + set + { + this.shiftHour=value; + + this.keyModified["shift_hour"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Holidays.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Holidays.cs new file mode 100644 index 0000000..6684845 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Holidays.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class Holidays : Model + { + private List holidays; + private Dictionary keyModified=new Dictionary(); + + public List Holidays_1 + { + /// The method to get the holidays + /// Instance of List + get + { + return this.holidays; + + } + /// The method to set the value to holidays + /// Instance of List + set + { + this.holidays=value; + + this.keyModified["holidays"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/HolidaysOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/HolidaysOperations.cs new file mode 100644 index 0000000..3548e09 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/HolidaysOperations.cs @@ -0,0 +1,231 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class HolidaysOperations + { + private string xCrmOrg; + + /// /// Creates an instance of HolidaysOperations with the given parameters + /// string + + public HolidaysOperations(string xCrmOrg) + { + this.xCrmOrg=xCrmOrg; + + + } + + /// The method to get holidays + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetHolidays(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/holidays"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.GetHolidaysHeader"), this.xCrmOrg); + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create holidays + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateHolidays(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/holidays"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.CreateHolidaysHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update holidays + /// Instance of Holidays + /// Instance of APIResponse + public APIResponse UpdateHolidays(Holidays request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/holidays"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.UpdateHolidaysHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update holiday + /// long? + /// Instance of Holidays + /// Instance of APIResponse + public APIResponse UpdateHoliday(long? holidayId, Holidays request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/holidays/"); + + apiPath=string.Concat(apiPath, holidayId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.UpdateHolidayHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get holiday + /// long? + /// Instance of APIResponse + public APIResponse GetHoliday(long? holidayId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/holidays/"); + + apiPath=string.Concat(apiPath, holidayId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.GetHolidayHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ResonseHandler), "application/json"); + + + } + + /// The method to delete holiday + /// long? + /// Instance of APIResponse + public APIResponse DeleteHoliday(long? holidayId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/holidays/"); + + apiPath=string.Concat(apiPath, holidayId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.AddHeader(new Header("X-CRM-ORG", "com.zoho.crm.api.Holidays.DeleteHolidayHeader"), this.xCrmOrg); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetHolidaysHeader + { + } + + + public static class GetHolidaysParam + { + public static readonly Param YEAR=new Param("year", "com.zoho.crm.api.Holidays.GetHolidaysParam"); + public static readonly Param> TYPE=new Param>("type", "com.zoho.crm.api.Holidays.GetHolidaysParam"); + public static readonly Param SHIFT_ID=new Param("shift_id", "com.zoho.crm.api.Holidays.GetHolidaysParam"); + } + + + public static class CreateHolidaysHeader + { + } + + + public static class UpdateHolidaysHeader + { + } + + + public static class UpdateHolidayHeader + { + } + + + public static class GetHolidayHeader + { + } + + + public static class DeleteHolidayHeader + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Info.cs new file mode 100644 index 0000000..2ae25b7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class Info : Model + { + private int? perPage; + private int? count; + private int? page; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResonseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResonseHandler.cs new file mode 100644 index 0000000..ae39616 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResonseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Holidays +{ + + public interface ResonseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResponseHandler.cs new file mode 100644 index 0000000..e1c5f53 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Holidays +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResponseWrapper.cs new file mode 100644 index 0000000..2e2b4a0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class ResponseWrapper : Model, ResponseHandler, ResonseHandler + { + private List holidays; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Holidays + { + /// The method to get the holidays + /// Instance of List + get + { + return this.holidays; + + } + /// The method to set the value to holidays + /// Instance of List + set + { + this.holidays=value; + + this.keyModified["holidays"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ShiftHoliday.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ShiftHoliday.cs new file mode 100644 index 0000000..3ef169e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ShiftHoliday.cs @@ -0,0 +1,123 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class ShiftHoliday : Model + { + private string name; + private DateTime? date; + private Choice type; + private ShiftHour shiftHour; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public DateTime? Date + { + /// The method to get the date + /// DateTime? representing the date + get + { + return this.date; + + } + /// The method to set the value to date + /// DateTime? + set + { + this.date=value; + + this.keyModified["date"] = 1; + + } + } + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public ShiftHour ShiftHour + { + /// The method to get the shiftHour + /// Instance of ShiftHour + get + { + return this.shiftHour; + + } + /// The method to set the value to shiftHour + /// Instance of ShiftHour + set + { + this.shiftHour=value; + + this.keyModified["shift_hour"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ShiftHour.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ShiftHour.cs new file mode 100644 index 0000000..7fea659 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/ShiftHour.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class ShiftHour : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/SuccessResponse.cs new file mode 100644 index 0000000..e689898 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Holidays/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Holidays +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ISCSignature/Signature.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ISCSignature/Signature.cs new file mode 100644 index 0000000..4999de0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ISCSignature/Signature.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.ISCSignature +{ + + public class Signature : Model + { + private object iscSignature; + private Dictionary keyModified=new Dictionary(); + + public object IscSignature + { + /// The method to get the iscSignature + /// object representing the iscSignature + get + { + return this.iscSignature; + + } + /// The method to set the value to iscSignature + /// object + set + { + this.iscSignature=value; + + this.keyModified["isc_signature"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Initializer.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Initializer.cs new file mode 100644 index 0000000..823892e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Initializer.cs @@ -0,0 +1,330 @@ +/** +Copyright (c) 2021, ZOHO CORPORATION PRIVATE LIMITED +All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +using System; +using System.IO; +using System.Reflection; +using Com.Zoho.API.Authenticator; +using Com.Zoho.API.Authenticator.Store; +using Com.Zoho.Crm.API.Logger; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json.Linq; +using System.Threading; +using Com.Zoho.API.Exception; +using System.Text; + +namespace Com.Zoho.Crm.API +{ + /// + /// This class to initialize Zoho CRM SDK. + /// + public class Initializer : IDisposable + { + private static ThreadLocal LOCAL = new ThreadLocal(); + private static Initializer initializer; + private Dc.DataCenter.Environment environment; + private ITokenStore store; + private IToken token; + public static JObject jsonDetails; + private string resourcePath; + private RequestProxy requestProxy; + private SDKConfig sdkConfig; + + private Initializer() + { + } + + private static void Initialize(Dc.DataCenter.Environment environment, IToken token, ITokenStore store, SDKConfig sdkConfig, string resourcePath, Logger.Logger logger, RequestProxy proxy) + { + try + { + SDKLogger.Initialize(logger); + try + { + string result = ""; + using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(Constants.JSON_DETAILS_FILE_PATH)) + { + using (StreamReader reader = new StreamReader(stream)) + { + result = reader.ReadToEnd(); + } + } + jsonDetails = JObject.Parse(result); + } + catch (System.Exception e) + { + throw new SDKException(Constants.JSON_DETAILS_ERROR, e); + } + initializer = new Initializer(); + initializer.environment = environment; + initializer.sdkConfig = sdkConfig; + initializer.resourcePath = resourcePath; + initializer.requestProxy = proxy; + initializer.store = store; + initializer.token = token; + if (initializer.token != null) + { + initializer.token.GenerateToken(); + } + SDKLogger.LogInfo(Constants.INITIALIZATION_SUCCESSFUL + initializer.ToString()); + } + catch(SDKException e) + { + throw e; + } + catch (Exception e) + { + throw new SDKException(Constants.INITIALIZATION_EXCEPTION, e); + } + } + + private static void SwitchUser(Dc.DataCenter.Environment environment, IToken token, SDKConfig sdkConfig, RequestProxy proxy) + { + Initializer initializer = new Initializer(); + initializer.environment = environment; + initializer.store = Initializer.initializer.store; + initializer.sdkConfig = sdkConfig; + initializer.resourcePath = Initializer.initializer.resourcePath; + initializer.requestProxy = proxy; + initializer.token = token; + LOCAL.Value = initializer; + if (initializer.token != null) + { + initializer.token.GenerateToken(); + } + SDKLogger.LogInfo(Constants.INITIALIZATION_SWITCHED + initializer.ToString()); + } + + /// + /// This method to get record field information details. + /// + /// A String containing the class information details file path. + /// + public static JObject GetJSON(string filePath) + { + StreamReader sr = new StreamReader(filePath); + string fileContent = sr.ReadToEnd(); + sr.Close(); + return JObject.Parse(fileContent); + } + + /// + /// This method to get Initializer class instance. + /// + /// A Initializer class instance representing the SDK configuration details. + public static Initializer GetInitializer() + { + if (Initializer.LOCAL.Value != null) + { + return Initializer.LOCAL.Value; + } + return initializer; + } + + /// + /// This is a getter method to get API environment. + /// + /// A Environment representing the API environment. + public Dc.DataCenter.Environment Environment + { + get + { + return environment; + } + } + + /// + /// This is a getter method to get API environment. + /// + /// A TokenStore class instance containing the token store information. + public ITokenStore Store + { + get + { + return store; + } + } + + /// + /// This is a getter method to get OAuth client application information. + /// + /// A Token class instance representing the OAuth client application information. + public IToken Token + { + get + { + return token; + } + } + + public string ResourcePath + { + get + { + return resourcePath; + } + } + + /// + /// This is a getter method to get Proxy information. + /// + /// A RequestProxy class instance representing the API Proxy information. + public RequestProxy RequestProxy + { + get + { + return requestProxy; + } + } + + /// + /// This is a getter method to get the SDK Configuration + /// + /// A SDKConfig instance representing the configuration + public SDKConfig SDKConfig + { + get + { + return sdkConfig; + } + } + + public override string ToString() + { + return new StringBuilder().Append(Constants.IN_ENVIRONMENT).Append(GetInitializer().Environment.GetUrl()).Append(".").ToString(); + } + + public void Dispose() + { + ((IDisposable)LOCAL).Dispose(); + } + + public class Builder + { + private Dc.DataCenter.Environment environment; + private ITokenStore store; + private IToken token; + private string resourcePath; + private RequestProxy requestProxy; + private SDKConfig sdkConfig; + private Logger.Logger logger; + private string errorMessage = (Initializer.initializer != null) ? Constants.SWITCH_USER_ERROR : Constants.INITIALIZATION_ERROR; + + public Builder() + { + if(Initializer.initializer != null) + { + environment = Initializer.initializer.Environment; + token = Initializer.initializer.Token; + sdkConfig = Initializer.initializer.SDKConfig; + } + } + + public bool AreAllObjectsNull(params Object[] objects) + { + foreach (Object o in objects) + { + if (o != null) + { + return false; + } + } + return true; + } + + public void Initialize() + { + Utility.AssertNotNull(token, errorMessage, Constants.TOKEN_ERROR_MESSAGE); + if (store == null) + { + store = new FileStore(Path.GetDirectoryName(Assembly.GetCallingAssembly().Location) + Path.DirectorySeparatorChar + Constants.TOKEN_FILE); + } + if (sdkConfig == null) + { + sdkConfig = new SDKConfig.Builder().Build(); + } + if (resourcePath == null) + { + resourcePath = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location); + } + if (logger == null) + { + logger = new Logger.Logger.Builder().Level(API.Logger.Logger.Levels.OFF).FilePath(null).Build(); + } + Initializer.Initialize(this.environment, this.token, this.store, this.sdkConfig, this.resourcePath, this.logger, this.requestProxy); + } + + public void SwitchUser() + { + Utility.AssertNotNull(Initializer.initializer, Constants.SDK_UNINITIALIZATION_ERROR, Constants.SDK_UNINITIALIZATION_MESSAGE); + if (this.sdkConfig == null) + { + this.sdkConfig = new SDKConfig.Builder().Build(); + } + Initializer.SwitchUser(this.environment, this.token, this.sdkConfig, this.requestProxy); + } + + public Builder Logger(Logger.Logger logger) + { + this.logger = logger; + return this; + } + + public Builder Token(IToken token) + { + Utility.AssertNotNull(token, errorMessage, Constants.TOKEN_ERROR_MESSAGE); + this.token = token; + return this; + } + + public Builder SDKConfig(SDKConfig sdkConfig) + { + this.sdkConfig = sdkConfig; + return this; + } + + public Builder RequestProxy(RequestProxy requestProxy) + { + this.requestProxy = requestProxy; + return this; + } + + public Builder ResourcePath(string resourcePath) + { + if(resourcePath != null && !Directory.Exists(resourcePath)) + { + throw new SDKException(errorMessage, Constants.RESOURCE_PATH_INVALID_ERROR_MESSAGE); + } + this.resourcePath = resourcePath; + return this; + } + + public Builder Store(ITokenStore store) + { + this.store = store; + return this; + } + + public Builder Environment(Dc.DataCenter.Environment environment) + { + Utility.AssertNotNull(environment, errorMessage, Constants.ENVIRONMENT_ERROR_MESSAGE); + this.environment = environment; + return this; + } + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/APIException.cs new file mode 100644 index 0000000..e3fac00 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryConvert +{ + + public class APIException : Model + { + private Choice code; + private Dictionary details; + private Choice message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/ConvertTo.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/ConvertTo.cs new file mode 100644 index 0000000..4245f2b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/ConvertTo.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryConvert +{ + + public class ConvertTo : Model + { + private Module module; + private bool? carryOverTags; + private Dictionary keyModified=new Dictionary(); + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public bool? CarryOverTags + { + /// The method to get the carryOverTags + /// bool? representing the carryOverTags + get + { + return this.carryOverTags; + + } + /// The method to set the value to carryOverTags + /// bool? + set + { + this.carryOverTags=value; + + this.keyModified["carry_over_tags"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/InventoryConverter.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/InventoryConverter.cs new file mode 100644 index 0000000..ef7d197 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/InventoryConverter.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryConvert +{ + + public class InventoryConverter : Model + { + private List convertTo; + private Dictionary keyModified=new Dictionary(); + + public List ConvertTo + { + /// The method to get the convertTo + /// Instance of List + get + { + return this.convertTo; + + } + /// The method to set the value to convertTo + /// Instance of List + set + { + this.convertTo=value; + + this.keyModified["convert_to"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/Module.cs new file mode 100644 index 0000000..074ffd8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryConvert +{ + + public class Module : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/Record.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/Record.cs new file mode 100644 index 0000000..283c8cd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/Record.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryConvert +{ + + public class Record : Model + { + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/SuccessResponse.cs new file mode 100644 index 0000000..5556da8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryConvert/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryConvert +{ + + public class SuccessResponse : Model + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/APIException.cs new file mode 100644 index 0000000..e25541e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryMassConvert +{ + + public class APIException : Model + { + private Choice code; + private Dictionary details; + private Choice message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/BodyWrapper.cs new file mode 100644 index 0000000..ed31162 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/BodyWrapper.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryMassConvert +{ + + public class BodyWrapper : Model + { + private List convertTo; + private User assignTo; + private List relatedModules; + private List ids; + private Dictionary keyModified=new Dictionary(); + + public List ConvertTo + { + /// The method to get the convertTo + /// Instance of List + get + { + return this.convertTo; + + } + /// The method to set the value to convertTo + /// Instance of List + set + { + this.convertTo=value; + + this.keyModified["convert_to"] = 1; + + } + } + + public User AssignTo + { + /// The method to get the assignTo + /// Instance of User + get + { + return this.assignTo; + + } + /// The method to set the value to assignTo + /// Instance of User + set + { + this.assignTo=value; + + this.keyModified["assign_to"] = 1; + + } + } + + public List RelatedModules + { + /// The method to get the relatedModules + /// Instance of List + get + { + return this.relatedModules; + + } + /// The method to set the value to relatedModules + /// Instance of List + set + { + this.relatedModules=value; + + this.keyModified["related_modules"] = 1; + + } + } + + public List Ids + { + /// The method to get the ids + /// Instance of List + get + { + return this.ids; + + } + /// The method to set the value to ids + /// Instance of List + set + { + this.ids=value; + + this.keyModified["ids"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/ConvertTo.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/ConvertTo.cs new file mode 100644 index 0000000..d003166 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/ConvertTo.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryMassConvert +{ + + public class ConvertTo : Model + { + private Module module; + private bool? carryOverTags; + private Dictionary keyModified=new Dictionary(); + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public bool? CarryOverTags + { + /// The method to get the carryOverTags + /// bool? representing the carryOverTags + get + { + return this.carryOverTags; + + } + /// The method to set the value to carryOverTags + /// bool? + set + { + this.carryOverTags=value; + + this.keyModified["carry_over_tags"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/Module.cs new file mode 100644 index 0000000..60c2aea --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryMassConvert +{ + + public class Module : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/RelatedModules.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/RelatedModules.cs new file mode 100644 index 0000000..ba2c11f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/RelatedModules.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryMassConvert +{ + + public class RelatedModules : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/SuccessResponse.cs new file mode 100644 index 0000000..039e60e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryMassConvert +{ + + public class SuccessResponse : Model + { + private Choice code; + private Choice message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/User.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/User.cs new file mode 100644 index 0000000..a96e193 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryMassConvert/User.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryMassConvert +{ + + public class User : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/APIException.cs new file mode 100644 index 0000000..bfce871 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/Folder.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/Folder.cs new file mode 100644 index 0000000..418e654 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/Folder.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class Folder : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/Info.cs new file mode 100644 index 0000000..3c602f3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class Info : Model + { + private int? perPage; + private int? page; + private int? count; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/InventoryTemplates.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/InventoryTemplates.cs new file mode 100644 index 0000000..271e8ab --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/InventoryTemplates.cs @@ -0,0 +1,355 @@ +using Com.Zoho.Crm.API.SendMail; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class InventoryTemplates : Model, Template + { + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private DateTimeOffset? lastUsageTime; + private Folder folder; + private ModuleMap module; + private User createdBy; + private User modifiedBy; + private string name; + private long? id; + private string editorMode; + private string category; + private bool? favorite; + private string content; + private bool? active; + private string mailContent; + private Dictionary keyModified=new Dictionary(); + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public DateTimeOffset? LastUsageTime + { + /// The method to get the lastUsageTime + /// DateTimeOffset? representing the lastUsageTime + get + { + return this.lastUsageTime; + + } + /// The method to set the value to lastUsageTime + /// DateTimeOffset? + set + { + this.lastUsageTime=value; + + this.keyModified["last_usage_time"] = 1; + + } + } + + public Folder Folder + { + /// The method to get the folder + /// Instance of Folder + get + { + return this.folder; + + } + /// The method to set the value to folder + /// Instance of Folder + set + { + this.folder=value; + + this.keyModified["folder"] = 1; + + } + } + + public ModuleMap Module + { + /// The method to get the module + /// Instance of ModuleMap + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of ModuleMap + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public User CreatedBy + { + /// The method to get the createdBy + /// Instance of User + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of User + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public User ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of User + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of User + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string EditorMode + { + /// The method to get the editorMode + /// string representing the editorMode + get + { + return this.editorMode; + + } + /// The method to set the value to editorMode + /// string + set + { + this.editorMode=value; + + this.keyModified["editor_mode"] = 1; + + } + } + + public string Category + { + /// The method to get the category + /// string representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// string + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public bool? Favorite + { + /// The method to get the favorite + /// bool? representing the favorite + get + { + return this.favorite; + + } + /// The method to set the value to favorite + /// bool? + set + { + this.favorite=value; + + this.keyModified["favorite"] = 1; + + } + } + + public string Content + { + /// The method to get the content + /// string representing the content + get + { + return this.content; + + } + /// The method to set the value to content + /// string + set + { + this.content=value; + + this.keyModified["content"] = 1; + + } + } + + public bool? Active + { + /// The method to get the active + /// bool? representing the active + get + { + return this.active; + + } + /// The method to set the value to active + /// bool? + set + { + this.active=value; + + this.keyModified["active"] = 1; + + } + } + + public string MailContent + { + /// The method to get the mailContent + /// string representing the mailContent + get + { + return this.mailContent; + + } + /// The method to set the value to mailContent + /// string + set + { + this.mailContent=value; + + this.keyModified["mail_content"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/InventoryTemplatesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/InventoryTemplatesOperations.cs new file mode 100644 index 0000000..cf364c5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/InventoryTemplatesOperations.cs @@ -0,0 +1,67 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class InventoryTemplatesOperations + { + /// The method to get inventory templates + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetInventoryTemplates(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/inventory_templates"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get inventory template + /// long? + /// Instance of APIResponse + public APIResponse GetInventoryTemplate(long? template) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/inventory_templates/"); + + apiPath=string.Concat(apiPath, template.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetInventoryTemplatesParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); + public static readonly Param CATEGORY=new Param("category", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); + public static readonly Param SORT_BY=new Param("sort_by", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); + public static readonly Param SORT_ORDER=new Param("sort_order", "com.zoho.crm.api.InventoryTemplates.GetInventoryTemplatesParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ModuleMap.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ModuleMap.cs new file mode 100644 index 0000000..09c30e5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ModuleMap.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class ModuleMap : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ResponseHandler.cs new file mode 100644 index 0000000..98a7615 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ResponseWrapper.cs new file mode 100644 index 0000000..3b05890 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List inventoryTemplates; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List InventoryTemplates + { + /// The method to get the inventoryTemplates + /// Instance of List + get + { + return this.inventoryTemplates; + + } + /// The method to set the value to inventoryTemplates + /// Instance of List + set + { + this.inventoryTemplates=value; + + this.keyModified["inventory_templates"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/User.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/User.cs new file mode 100644 index 0000000..0a7339b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/InventoryTemplates/User.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.InventoryTemplates +{ + + public class User : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/APIException.cs new file mode 100644 index 0000000..2d1d5d9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class APIException : Model, ResponseHandler + { + private Choice code; + private Choice message; + private Dictionary details; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionResponse.cs new file mode 100644 index 0000000..b09d8cc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Layouts +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionWrapper.cs new file mode 100644 index 0000000..2f8d4f7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class ActionWrapper : Model + { + private List layouts; + private Dictionary keyModified=new Dictionary(); + + public List Layouts + { + /// The method to get the layouts + /// Instance of List + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of List + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionsAllowed.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionsAllowed.cs new file mode 100644 index 0000000..d3daa9e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ActionsAllowed.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class ActionsAllowed : Model + { + private bool? edit; + private bool? rename; + private bool? clone; + private bool? downgrade; + private bool? delete; + private bool? deactivate; + private bool? setLayoutPermissions; + private Dictionary keyModified=new Dictionary(); + + public bool? Edit + { + /// The method to get the edit + /// bool? representing the edit + get + { + return this.edit; + + } + /// The method to set the value to edit + /// bool? + set + { + this.edit=value; + + this.keyModified["edit"] = 1; + + } + } + + public bool? Rename + { + /// The method to get the rename + /// bool? representing the rename + get + { + return this.rename; + + } + /// The method to set the value to rename + /// bool? + set + { + this.rename=value; + + this.keyModified["rename"] = 1; + + } + } + + public bool? Clone + { + /// The method to get the clone + /// bool? representing the clone + get + { + return this.clone; + + } + /// The method to set the value to clone + /// bool? + set + { + this.clone=value; + + this.keyModified["clone"] = 1; + + } + } + + public bool? Downgrade + { + /// The method to get the downgrade + /// bool? representing the downgrade + get + { + return this.downgrade; + + } + /// The method to set the value to downgrade + /// bool? + set + { + this.downgrade=value; + + this.keyModified["downgrade"] = 1; + + } + } + + public bool? Delete + { + /// The method to get the delete + /// bool? representing the delete + get + { + return this.delete; + + } + /// The method to set the value to delete + /// bool? + set + { + this.delete=value; + + this.keyModified[Constants.REQUEST_METHOD_DELETE] = 1; + + } + } + + public bool? Deactivate + { + /// The method to get the deactivate + /// bool? representing the deactivate + get + { + return this.deactivate; + + } + /// The method to set the value to deactivate + /// bool? + set + { + this.deactivate=value; + + this.keyModified["deactivate"] = 1; + + } + } + + public bool? SetLayoutPermissions + { + /// The method to get the setLayoutPermissions + /// bool? representing the setLayoutPermissions + get + { + return this.setLayoutPermissions; + + } + /// The method to set the value to setLayoutPermissions + /// bool? + set + { + this.setLayoutPermissions=value; + + this.keyModified["set_layout_permissions"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/BodyWrapper.cs new file mode 100644 index 0000000..e66df87 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class BodyWrapper : Model + { + private List layouts; + private Dictionary keyModified=new Dictionary(); + + public List Layouts + { + /// The method to get the layouts + /// Instance of List + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of List + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ConvertMapping.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ConvertMapping.cs new file mode 100644 index 0000000..64b5607 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ConvertMapping.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class ConvertMapping : Model + { + private MinifiedLayout contacts; + private DealLayoutMapping deals; + private MinifiedLayout accounts; + private MinifiedLayout invoices; + private MinifiedLayout salesorders; + private Dictionary keyModified=new Dictionary(); + + public MinifiedLayout Contacts + { + /// The method to get the contacts + /// Instance of MinifiedLayout + get + { + return this.contacts; + + } + /// The method to set the value to contacts + /// Instance of MinifiedLayout + set + { + this.contacts=value; + + this.keyModified["Contacts"] = 1; + + } + } + + public DealLayoutMapping Deals + { + /// The method to get the deals + /// Instance of DealLayoutMapping + get + { + return this.deals; + + } + /// The method to set the value to deals + /// Instance of DealLayoutMapping + set + { + this.deals=value; + + this.keyModified["Deals"] = 1; + + } + } + + public MinifiedLayout Accounts + { + /// The method to get the accounts + /// Instance of MinifiedLayout + get + { + return this.accounts; + + } + /// The method to set the value to accounts + /// Instance of MinifiedLayout + set + { + this.accounts=value; + + this.keyModified["Accounts"] = 1; + + } + } + + public MinifiedLayout Invoices + { + /// The method to get the invoices + /// Instance of MinifiedLayout + get + { + return this.invoices; + + } + /// The method to set the value to invoices + /// Instance of MinifiedLayout + set + { + this.invoices=value; + + this.keyModified["Invoices"] = 1; + + } + } + + public MinifiedLayout Salesorders + { + /// The method to get the salesorders + /// Instance of MinifiedLayout + get + { + return this.salesorders; + + } + /// The method to set the value to salesorders + /// Instance of MinifiedLayout + set + { + this.salesorders=value; + + this.keyModified["SalesOrders"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DealField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DealField.cs new file mode 100644 index 0000000..31e771c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DealField.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class DealField : Model + { + private string apiName; + private string fieldLabel; + private long? id; + private bool? required; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string FieldLabel + { + /// The method to get the fieldLabel + /// string representing the fieldLabel + get + { + return this.fieldLabel; + + } + /// The method to set the value to fieldLabel + /// string + set + { + this.fieldLabel=value; + + this.keyModified["field_label"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? Required + { + /// The method to get the required + /// bool? representing the required + get + { + return this.required; + + } + /// The method to set the value to required + /// bool? + set + { + this.required=value; + + this.keyModified["required"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DealLayoutMapping.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DealLayoutMapping.cs new file mode 100644 index 0000000..2831055 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DealLayoutMapping.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class DealLayoutMapping : MinifiedLayout , Model + { + private List fields; + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DefaultAssignmentView.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DefaultAssignmentView.cs new file mode 100644 index 0000000..c177429 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DefaultAssignmentView.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class DefaultAssignmentView : Model + { + private string name; + private long? id; + private string type; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DefaultView.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DefaultView.cs new file mode 100644 index 0000000..6d88051 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/DefaultView.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class DefaultView : Model + { + private string name; + private long? id; + private string type; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Layouts.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Layouts.cs new file mode 100644 index 0000000..0a3887e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Layouts.cs @@ -0,0 +1,502 @@ +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class Layouts : Model + { + private int? displayType; + private string apiName; + private bool? hasMoreProfiles; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private bool? visible; + private string source; + private long? id; + private string name; + private string displayLabel; + private string mode; + private SubformProperty subformProperties; + private string status; + private bool? showBusinessCard; + private string generatedType; + private Users.MinifiedUser createdFor; + private ConvertMapping convertMapping; + private Users.MinifiedUser modifiedBy; + private List profiles; + private Users.MinifiedUser createdBy; + private List sections; + private ActionsAllowed actionsAllowed; + private Dictionary keyModified=new Dictionary(); + + public int? DisplayType + { + /// The method to get the displayType + /// int? representing the displayType + get + { + return this.displayType; + + } + /// The method to set the value to displayType + /// int? + set + { + this.displayType=value; + + this.keyModified["display_type"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public bool? HasMoreProfiles + { + /// The method to get the hasMoreProfiles + /// bool? representing the hasMoreProfiles + get + { + return this.hasMoreProfiles; + + } + /// The method to set the value to hasMoreProfiles + /// bool? + set + { + this.hasMoreProfiles=value; + + this.keyModified["has_more_profiles"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public bool? Visible + { + /// The method to get the visible + /// bool? representing the visible + get + { + return this.visible; + + } + /// The method to set the value to visible + /// bool? + set + { + this.visible=value; + + this.keyModified["visible"] = 1; + + } + } + + public string Source + { + /// The method to get the source + /// string representing the source + get + { + return this.source; + + } + /// The method to set the value to source + /// string + set + { + this.source=value; + + this.keyModified["source"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string Mode + { + /// The method to get the mode + /// string representing the mode + get + { + return this.mode; + + } + /// The method to set the value to mode + /// string + set + { + this.mode=value; + + this.keyModified["mode"] = 1; + + } + } + + public SubformProperty SubformProperties + { + /// The method to get the subformProperties + /// Instance of SubformProperty + get + { + return this.subformProperties; + + } + /// The method to set the value to subformProperties + /// Instance of SubformProperty + set + { + this.subformProperties=value; + + this.keyModified["subform_properties"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public bool? ShowBusinessCard + { + /// The method to get the showBusinessCard + /// bool? representing the showBusinessCard + get + { + return this.showBusinessCard; + + } + /// The method to set the value to showBusinessCard + /// bool? + set + { + this.showBusinessCard=value; + + this.keyModified["show_business_card"] = 1; + + } + } + + public string GeneratedType + { + /// The method to get the generatedType + /// string representing the generatedType + get + { + return this.generatedType; + + } + /// The method to set the value to generatedType + /// string + set + { + this.generatedType=value; + + this.keyModified["generated_type"] = 1; + + } + } + + public Users.MinifiedUser CreatedFor + { + /// The method to get the createdFor + /// Instance of MinifiedUser + get + { + return this.createdFor; + + } + /// The method to set the value to createdFor + /// Instance of MinifiedUser + set + { + this.createdFor=value; + + this.keyModified["created_for"] = 1; + + } + } + + public ConvertMapping ConvertMapping + { + /// The method to get the convertMapping + /// Instance of ConvertMapping + get + { + return this.convertMapping; + + } + /// The method to set the value to convertMapping + /// Instance of ConvertMapping + set + { + this.convertMapping=value; + + this.keyModified["convert_mapping"] = 1; + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public List Profiles + { + /// The method to get the profiles + /// Instance of List + get + { + return this.profiles; + + } + /// The method to set the value to profiles + /// Instance of List + set + { + this.profiles=value; + + this.keyModified["profiles"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public List Sections + { + /// The method to get the sections + /// Instance of List + get + { + return this.sections; + + } + /// The method to set the value to sections + /// Instance of List + set + { + this.sections=value; + + this.keyModified["sections"] = 1; + + } + } + + public ActionsAllowed ActionsAllowed + { + /// The method to get the actionsAllowed + /// Instance of ActionsAllowed + get + { + return this.actionsAllowed; + + } + /// The method to set the value to actionsAllowed + /// Instance of ActionsAllowed + set + { + this.actionsAllowed=value; + + this.keyModified["actions_allowed"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/LayoutsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/LayoutsOperations.cs new file mode 100644 index 0000000..889deda --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/LayoutsOperations.cs @@ -0,0 +1,83 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class LayoutsOperations + { + /// The method to get layouts + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetLayouts(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/layouts"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get layout + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetLayout(long? id, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/layouts/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetLayoutsParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Layouts.GetLayoutsParam"); + } + + + public static class GetLayoutsHeader + { + } + + + public static class GetLayoutParam + { + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Layouts.GetLayoutParam"); + } + + + public static class GetLayoutHeader + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/MinifiedLayout.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/MinifiedLayout.cs new file mode 100644 index 0000000..6fb51fc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/MinifiedLayout.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class MinifiedLayout : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Profiles.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Profiles.cs new file mode 100644 index 0000000..f2359d3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Profiles.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class Profiles : Model + { + private bool? default1; + private string name; + private long? id; + private DefaultView defaultview; + private DefaultAssignmentView defaultassignmentview; + private Dictionary keyModified=new Dictionary(); + + public bool? Default + { + /// The method to get the default + /// bool? representing the default1 + get + { + return this.default1; + + } + /// The method to set the value to default + /// bool? + set + { + this.default1=value; + + this.keyModified["default"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public DefaultView Defaultview + { + /// The method to get the defaultview + /// Instance of DefaultView + get + { + return this.defaultview; + + } + /// The method to set the value to defaultview + /// Instance of DefaultView + set + { + this.defaultview=value; + + this.keyModified["_default_view"] = 1; + + } + } + + public DefaultAssignmentView Defaultassignmentview + { + /// The method to get the defaultassignmentview + /// Instance of DefaultAssignmentView + get + { + return this.defaultassignmentview; + + } + /// The method to set the value to defaultassignmentview + /// Instance of DefaultAssignmentView + set + { + this.defaultassignmentview=value; + + this.keyModified["_default_assignment_view"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Properties.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Properties.cs new file mode 100644 index 0000000..c2425f4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Properties.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class Properties : Model + { + private bool? reorderRows; + private int? maximumRows; + private Tooltip tooltip; + private Dictionary keyModified=new Dictionary(); + + public bool? ReorderRows + { + /// The method to get the reorderRows + /// bool? representing the reorderRows + get + { + return this.reorderRows; + + } + /// The method to set the value to reorderRows + /// bool? + set + { + this.reorderRows=value; + + this.keyModified["reorder_rows"] = 1; + + } + } + + public int? MaximumRows + { + /// The method to get the maximumRows + /// int? representing the maximumRows + get + { + return this.maximumRows; + + } + /// The method to set the value to maximumRows + /// int? + set + { + this.maximumRows=value; + + this.keyModified["maximum_rows"] = 1; + + } + } + + public Tooltip Tooltip + { + /// The method to get the tooltip + /// Instance of Tooltip + get + { + return this.tooltip; + + } + /// The method to set the value to tooltip + /// Instance of Tooltip + set + { + this.tooltip=value; + + this.keyModified["tooltip"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ResponseHandler.cs new file mode 100644 index 0000000..90c6945 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Layouts +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ResponseWrapper.cs new file mode 100644 index 0000000..9413a1b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List layouts; + private Dictionary keyModified=new Dictionary(); + + public List Layouts + { + /// The method to get the layouts + /// Instance of List + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of List + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SectionField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SectionField.cs new file mode 100644 index 0000000..dcf854f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SectionField.cs @@ -0,0 +1,1763 @@ +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class SectionField : Fields.Fields , Model + { + private bool? required; + private Dictionary validationRule; + private string defaultValue; + private int? sequenceNumber; + private int? sectionId; + private bool? blueprintSupported; + private string jsonType; + private int? length; + private int? decimalPlace; + private Fields.MultiModuleLookup multiModuleLookup; + private Modules.SharingProperties sharingProperties; + private Fields.Currency currency; + private List fileUpoladOptionlist; + private Fields.Lookup lookup; + private Fields.Subform subform; + private Fields.Formula formula; + private Fields.Multiselectlookup multiselectlookup; + private Fields.Multiselectlookup multiuserlookup; + private List pickListValues; + private List allowedModules; + private bool? hipaaComplianceEnabled; + private Fields.HipaaCompliance hipaaCompliance; + private List staticValues; + private bool? staticField; + private List layoutAssociations; + private Modules.MinifiedModule associatedModule; + private string dataType; + private Fields.OperationType operationType; + private bool? systemMandatory; + private bool? webhook; + private bool? virtualField; + private bool? fieldReadOnly; + private List customizableProperties; + private bool? readOnly; + private bool? customField; + private bool? businesscardSupported; + private bool? filterable; + private bool? visible; + private bool? availableInUserLayout; + private bool? displayField; + private bool? pickListValuesSortedLexically; + private bool? sortable; + private bool? separator; + private bool? searchable; + private bool? enableColourCode; + private bool? massUpdate; + private string createdSource; + private string type; + private string displayLabel; + private string columnName; + private string apiName; + private int? displayType; + private int? uiType; + private bool? colourCodeEnabledBySystem; + private string quickSequenceNumber; + private Fields.EmailParser emailParser; + private Fields.RollupSummary rollupSummary; + private Fields.ReferFromField referFromField; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private int? showType; + private int? category; + private long? id; + private List profiles; + private Fields.ViewType viewType; + private Fields.Unique unique; + private Modules.MinifiedModule subModule; + private Fields.External external; + private Fields.Private private1; + private Fields.ConvertMapping convertMapping; + private Fields.AutoNumber autonumber; + private Fields.AutoNumber autoNumber70; + private Fields.Crypt crypt; + private Fields.Tooltip tooltip; + private Fields.HistoryTracking historyTracking; + private Fields.AssociationDetails associationDetails; + private string additionalColumn; + private string fieldLabel; + private object globalPicklist; + private bool? updateexistingrecords; + private bool? numberSeparator; + private Fields.Textarea textarea; + private Dictionary keyModified=new Dictionary(); + + public bool? Required + { + /// The method to get the required + /// bool? representing the required + get + { + return this.required; + + } + /// The method to set the value to required + /// bool? + set + { + this.required=value; + + this.keyModified["required"] = 1; + + } + } + + public Dictionary ValidationRule + { + /// The method to get the validationRule + /// Dictionary representing the validationRule + get + { + return this.validationRule; + + } + /// The method to set the value to validationRule + /// Dictionary + set + { + this.validationRule=value; + + this.keyModified["validation_rule"] = 1; + + } + } + + public string DefaultValue + { + /// The method to get the defaultValue + /// string representing the defaultValue + get + { + return this.defaultValue; + + } + /// The method to set the value to defaultValue + /// string + set + { + this.defaultValue=value; + + this.keyModified["default_value"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public int? SectionId + { + /// The method to get the sectionId + /// int? representing the sectionId + get + { + return this.sectionId; + + } + /// The method to set the value to sectionId + /// int? + set + { + this.sectionId=value; + + this.keyModified["section_id"] = 1; + + } + } + + public bool? BlueprintSupported + { + /// The method to get the blueprintSupported + /// bool? representing the blueprintSupported + get + { + return this.blueprintSupported; + + } + /// The method to set the value to blueprintSupported + /// bool? + set + { + this.blueprintSupported=value; + + this.keyModified["blueprint_supported"] = 1; + + } + } + + public string JsonType + { + /// The method to get the jsonType + /// string representing the jsonType + get + { + return this.jsonType; + + } + /// The method to set the value to jsonType + /// string + set + { + this.jsonType=value; + + this.keyModified["json_type"] = 1; + + } + } + + public int? Length + { + /// The method to get the length + /// int? representing the length + get + { + return this.length; + + } + /// The method to set the value to length + /// int? + set + { + this.length=value; + + this.keyModified["length"] = 1; + + } + } + + public int? DecimalPlace + { + /// The method to get the decimalPlace + /// int? representing the decimalPlace + get + { + return this.decimalPlace; + + } + /// The method to set the value to decimalPlace + /// int? + set + { + this.decimalPlace=value; + + this.keyModified["decimal_place"] = 1; + + } + } + + public Fields.MultiModuleLookup MultiModuleLookup + { + /// The method to get the multiModuleLookup + /// Instance of MultiModuleLookup + get + { + return this.multiModuleLookup; + + } + /// The method to set the value to multiModuleLookup + /// Instance of MultiModuleLookup + set + { + this.multiModuleLookup=value; + + this.keyModified["multi_module_lookup"] = 1; + + } + } + + public Modules.SharingProperties SharingProperties + { + /// The method to get the sharingProperties + /// Instance of SharingProperties + get + { + return this.sharingProperties; + + } + /// The method to set the value to sharingProperties + /// Instance of SharingProperties + set + { + this.sharingProperties=value; + + this.keyModified["sharing_properties"] = 1; + + } + } + + public Fields.Currency Currency + { + /// The method to get the currency + /// Instance of Currency + get + { + return this.currency; + + } + /// The method to set the value to currency + /// Instance of Currency + set + { + this.currency=value; + + this.keyModified["currency"] = 1; + + } + } + + public List FileUpoladOptionlist + { + /// The method to get the fileUpoladOptionlist + /// Instance of List + get + { + return this.fileUpoladOptionlist; + + } + /// The method to set the value to fileUpoladOptionlist + /// Instance of List + set + { + this.fileUpoladOptionlist=value; + + this.keyModified["file_upolad_optionlist"] = 1; + + } + } + + public Fields.Lookup Lookup + { + /// The method to get the lookup + /// Instance of Lookup + get + { + return this.lookup; + + } + /// The method to set the value to lookup + /// Instance of Lookup + set + { + this.lookup=value; + + this.keyModified["lookup"] = 1; + + } + } + + public Fields.Subform Subform + { + /// The method to get the subform + /// Instance of Subform + get + { + return this.subform; + + } + /// The method to set the value to subform + /// Instance of Subform + set + { + this.subform=value; + + this.keyModified["subform"] = 1; + + } + } + + public Fields.Formula Formula + { + /// The method to get the formula + /// Instance of Formula + get + { + return this.formula; + + } + /// The method to set the value to formula + /// Instance of Formula + set + { + this.formula=value; + + this.keyModified["formula"] = 1; + + } + } + + public Fields.Multiselectlookup Multiselectlookup + { + /// The method to get the multiselectlookup + /// Instance of Multiselectlookup + get + { + return this.multiselectlookup; + + } + /// The method to set the value to multiselectlookup + /// Instance of Multiselectlookup + set + { + this.multiselectlookup=value; + + this.keyModified["multiselectlookup"] = 1; + + } + } + + public Fields.Multiselectlookup Multiuserlookup + { + /// The method to get the multiuserlookup + /// Instance of Multiselectlookup + get + { + return this.multiuserlookup; + + } + /// The method to set the value to multiuserlookup + /// Instance of Multiselectlookup + set + { + this.multiuserlookup=value; + + this.keyModified["multiuserlookup"] = 1; + + } + } + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + public List AllowedModules + { + /// The method to get the allowedModules + /// Instance of List + get + { + return this.allowedModules; + + } + /// The method to set the value to allowedModules + /// Instance of List + set + { + this.allowedModules=value; + + this.keyModified["allowed_modules"] = 1; + + } + } + + public bool? HipaaComplianceEnabled + { + /// The method to get the hipaaComplianceEnabled + /// bool? representing the hipaaComplianceEnabled + get + { + return this.hipaaComplianceEnabled; + + } + /// The method to set the value to hipaaComplianceEnabled + /// bool? + set + { + this.hipaaComplianceEnabled=value; + + this.keyModified["hipaa_compliance_enabled"] = 1; + + } + } + + public Fields.HipaaCompliance HipaaCompliance + { + /// The method to get the hipaaCompliance + /// Instance of HipaaCompliance + get + { + return this.hipaaCompliance; + + } + /// The method to set the value to hipaaCompliance + /// Instance of HipaaCompliance + set + { + this.hipaaCompliance=value; + + this.keyModified["hipaa_compliance"] = 1; + + } + } + + public List StaticValues + { + /// The method to get the staticValues + /// Instance of List + get + { + return this.staticValues; + + } + /// The method to set the value to staticValues + /// Instance of List + set + { + this.staticValues=value; + + this.keyModified["static_values"] = 1; + + } + } + + public bool? StaticField + { + /// The method to get the staticField + /// bool? representing the staticField + get + { + return this.staticField; + + } + /// The method to set the value to staticField + /// bool? + set + { + this.staticField=value; + + this.keyModified["static_field"] = 1; + + } + } + + public List LayoutAssociations + { + /// The method to get the layoutAssociations + /// Instance of List + get + { + return this.layoutAssociations; + + } + /// The method to set the value to layoutAssociations + /// Instance of List + set + { + this.layoutAssociations=value; + + this.keyModified["layout_associations"] = 1; + + } + } + + public Modules.MinifiedModule AssociatedModule + { + /// The method to get the associatedModule + /// Instance of MinifiedModule + get + { + return this.associatedModule; + + } + /// The method to set the value to associatedModule + /// Instance of MinifiedModule + set + { + this.associatedModule=value; + + this.keyModified["associated_module"] = 1; + + } + } + + public string DataType + { + /// The method to get the dataType + /// string representing the dataType + get + { + return this.dataType; + + } + /// The method to set the value to dataType + /// string + set + { + this.dataType=value; + + this.keyModified["data_type"] = 1; + + } + } + + public Fields.OperationType OperationType + { + /// The method to get the operationType + /// Instance of OperationType + get + { + return this.operationType; + + } + /// The method to set the value to operationType + /// Instance of OperationType + set + { + this.operationType=value; + + this.keyModified["operation_type"] = 1; + + } + } + + public bool? SystemMandatory + { + /// The method to get the systemMandatory + /// bool? representing the systemMandatory + get + { + return this.systemMandatory; + + } + /// The method to set the value to systemMandatory + /// bool? + set + { + this.systemMandatory=value; + + this.keyModified["system_mandatory"] = 1; + + } + } + + public bool? Webhook + { + /// The method to get the webhook + /// bool? representing the webhook + get + { + return this.webhook; + + } + /// The method to set the value to webhook + /// bool? + set + { + this.webhook=value; + + this.keyModified["webhook"] = 1; + + } + } + + public bool? VirtualField + { + /// The method to get the virtualField + /// bool? representing the virtualField + get + { + return this.virtualField; + + } + /// The method to set the value to virtualField + /// bool? + set + { + this.virtualField=value; + + this.keyModified["virtual_field"] = 1; + + } + } + + public bool? FieldReadOnly + { + /// The method to get the fieldReadOnly + /// bool? representing the fieldReadOnly + get + { + return this.fieldReadOnly; + + } + /// The method to set the value to fieldReadOnly + /// bool? + set + { + this.fieldReadOnly=value; + + this.keyModified["field_read_only"] = 1; + + } + } + + public List CustomizableProperties + { + /// The method to get the customizableProperties + /// Instance of List + get + { + return this.customizableProperties; + + } + /// The method to set the value to customizableProperties + /// Instance of List + set + { + this.customizableProperties=value; + + this.keyModified["customizable_properties"] = 1; + + } + } + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public bool? CustomField + { + /// The method to get the customField + /// bool? representing the customField + get + { + return this.customField; + + } + /// The method to set the value to customField + /// bool? + set + { + this.customField=value; + + this.keyModified["custom_field"] = 1; + + } + } + + public bool? BusinesscardSupported + { + /// The method to get the businesscardSupported + /// bool? representing the businesscardSupported + get + { + return this.businesscardSupported; + + } + /// The method to set the value to businesscardSupported + /// bool? + set + { + this.businesscardSupported=value; + + this.keyModified["businesscard_supported"] = 1; + + } + } + + public bool? Filterable + { + /// The method to get the filterable + /// bool? representing the filterable + get + { + return this.filterable; + + } + /// The method to set the value to filterable + /// bool? + set + { + this.filterable=value; + + this.keyModified["filterable"] = 1; + + } + } + + public bool? Visible + { + /// The method to get the visible + /// bool? representing the visible + get + { + return this.visible; + + } + /// The method to set the value to visible + /// bool? + set + { + this.visible=value; + + this.keyModified["visible"] = 1; + + } + } + + public bool? AvailableInUserLayout + { + /// The method to get the availableInUserLayout + /// bool? representing the availableInUserLayout + get + { + return this.availableInUserLayout; + + } + /// The method to set the value to availableInUserLayout + /// bool? + set + { + this.availableInUserLayout=value; + + this.keyModified["available_in_user_layout"] = 1; + + } + } + + public bool? DisplayField + { + /// The method to get the displayField + /// bool? representing the displayField + get + { + return this.displayField; + + } + /// The method to set the value to displayField + /// bool? + set + { + this.displayField=value; + + this.keyModified["display_field"] = 1; + + } + } + + public bool? PickListValuesSortedLexically + { + /// The method to get the pickListValuesSortedLexically + /// bool? representing the pickListValuesSortedLexically + get + { + return this.pickListValuesSortedLexically; + + } + /// The method to set the value to pickListValuesSortedLexically + /// bool? + set + { + this.pickListValuesSortedLexically=value; + + this.keyModified["pick_list_values_sorted_lexically"] = 1; + + } + } + + public bool? Sortable + { + /// The method to get the sortable + /// bool? representing the sortable + get + { + return this.sortable; + + } + /// The method to set the value to sortable + /// bool? + set + { + this.sortable=value; + + this.keyModified["sortable"] = 1; + + } + } + + public bool? Separator + { + /// The method to get the separator + /// bool? representing the separator + get + { + return this.separator; + + } + /// The method to set the value to separator + /// bool? + set + { + this.separator=value; + + this.keyModified["separator"] = 1; + + } + } + + public bool? Searchable + { + /// The method to get the searchable + /// bool? representing the searchable + get + { + return this.searchable; + + } + /// The method to set the value to searchable + /// bool? + set + { + this.searchable=value; + + this.keyModified["searchable"] = 1; + + } + } + + public bool? EnableColourCode + { + /// The method to get the enableColourCode + /// bool? representing the enableColourCode + get + { + return this.enableColourCode; + + } + /// The method to set the value to enableColourCode + /// bool? + set + { + this.enableColourCode=value; + + this.keyModified["enable_colour_code"] = 1; + + } + } + + public bool? MassUpdate + { + /// The method to get the massUpdate + /// bool? representing the massUpdate + get + { + return this.massUpdate; + + } + /// The method to set the value to massUpdate + /// bool? + set + { + this.massUpdate=value; + + this.keyModified["mass_update"] = 1; + + } + } + + public string CreatedSource + { + /// The method to get the createdSource + /// string representing the createdSource + get + { + return this.createdSource; + + } + /// The method to set the value to createdSource + /// string + set + { + this.createdSource=value; + + this.keyModified["created_source"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string ColumnName + { + /// The method to get the columnName + /// string representing the columnName + get + { + return this.columnName; + + } + /// The method to set the value to columnName + /// string + set + { + this.columnName=value; + + this.keyModified["column_name"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public int? DisplayType + { + /// The method to get the displayType + /// int? representing the displayType + get + { + return this.displayType; + + } + /// The method to set the value to displayType + /// int? + set + { + this.displayType=value; + + this.keyModified["display_type"] = 1; + + } + } + + public int? UiType + { + /// The method to get the uiType + /// int? representing the uiType + get + { + return this.uiType; + + } + /// The method to set the value to uiType + /// int? + set + { + this.uiType=value; + + this.keyModified["ui_type"] = 1; + + } + } + + public bool? ColourCodeEnabledBySystem + { + /// The method to get the colourCodeEnabledBySystem + /// bool? representing the colourCodeEnabledBySystem + get + { + return this.colourCodeEnabledBySystem; + + } + /// The method to set the value to colourCodeEnabledBySystem + /// bool? + set + { + this.colourCodeEnabledBySystem=value; + + this.keyModified["colour_code_enabled_by_system"] = 1; + + } + } + + public string QuickSequenceNumber + { + /// The method to get the quickSequenceNumber + /// string representing the quickSequenceNumber + get + { + return this.quickSequenceNumber; + + } + /// The method to set the value to quickSequenceNumber + /// string + set + { + this.quickSequenceNumber=value; + + this.keyModified["quick_sequence_number"] = 1; + + } + } + + public Fields.EmailParser EmailParser + { + /// The method to get the emailParser + /// Instance of EmailParser + get + { + return this.emailParser; + + } + /// The method to set the value to emailParser + /// Instance of EmailParser + set + { + this.emailParser=value; + + this.keyModified["email_parser"] = 1; + + } + } + + public Fields.RollupSummary RollupSummary + { + /// The method to get the rollupSummary + /// Instance of RollupSummary + get + { + return this.rollupSummary; + + } + /// The method to set the value to rollupSummary + /// Instance of RollupSummary + set + { + this.rollupSummary=value; + + this.keyModified["rollup_summary"] = 1; + + } + } + + public Fields.ReferFromField ReferFromField + { + /// The method to get the referFromField + /// Instance of ReferFromField + get + { + return this.referFromField; + + } + /// The method to set the value to referFromField + /// Instance of ReferFromField + set + { + this.referFromField=value; + + this.keyModified["refer_from_field"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public int? ShowType + { + /// The method to get the showType + /// int? representing the showType + get + { + return this.showType; + + } + /// The method to set the value to showType + /// int? + set + { + this.showType=value; + + this.keyModified["show_type"] = 1; + + } + } + + public int? Category + { + /// The method to get the category + /// int? representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// int? + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public List Profiles + { + /// The method to get the profiles + /// Instance of List + get + { + return this.profiles; + + } + /// The method to set the value to profiles + /// Instance of List + set + { + this.profiles=value; + + this.keyModified["profiles"] = 1; + + } + } + + public Fields.ViewType ViewType + { + /// The method to get the viewType + /// Instance of ViewType + get + { + return this.viewType; + + } + /// The method to set the value to viewType + /// Instance of ViewType + set + { + this.viewType=value; + + this.keyModified["view_type"] = 1; + + } + } + + public Fields.Unique Unique + { + /// The method to get the unique + /// Instance of Unique + get + { + return this.unique; + + } + /// The method to set the value to unique + /// Instance of Unique + set + { + this.unique=value; + + this.keyModified["unique"] = 1; + + } + } + + public Modules.MinifiedModule SubModule + { + /// The method to get the subModule + /// Instance of MinifiedModule + get + { + return this.subModule; + + } + /// The method to set the value to subModule + /// Instance of MinifiedModule + set + { + this.subModule=value; + + this.keyModified["sub_module"] = 1; + + } + } + + public Fields.External External + { + /// The method to get the external + /// Instance of External + get + { + return this.external; + + } + /// The method to set the value to external + /// Instance of External + set + { + this.external=value; + + this.keyModified["external"] = 1; + + } + } + + public Fields.Private Private + { + /// The method to get the private + /// Instance of Private + get + { + return this.private1; + + } + /// The method to set the value to private + /// Instance of Private + set + { + this.private1=value; + + this.keyModified["private"] = 1; + + } + } + + public Fields.ConvertMapping ConvertMapping + { + /// The method to get the convertMapping + /// Instance of ConvertMapping + get + { + return this.convertMapping; + + } + /// The method to set the value to convertMapping + /// Instance of ConvertMapping + set + { + this.convertMapping=value; + + this.keyModified["convert_mapping"] = 1; + + } + } + + public Fields.AutoNumber Autonumber + { + /// The method to get the autonumber + /// Instance of AutoNumber + get + { + return this.autonumber; + + } + /// The method to set the value to autonumber + /// Instance of AutoNumber + set + { + this.autonumber=value; + + this.keyModified["autonumber"] = 1; + + } + } + + public Fields.AutoNumber AutoNumber70 + { + /// The method to get the autoNumber70 + /// Instance of AutoNumber + get + { + return this.autoNumber70; + + } + /// The method to set the value to autoNumber70 + /// Instance of AutoNumber + set + { + this.autoNumber70=value; + + this.keyModified["auto_number"] = 1; + + } + } + + public Fields.Crypt Crypt + { + /// The method to get the crypt + /// Instance of Crypt + get + { + return this.crypt; + + } + /// The method to set the value to crypt + /// Instance of Crypt + set + { + this.crypt=value; + + this.keyModified["crypt"] = 1; + + } + } + + public Fields.Tooltip Tooltip + { + /// The method to get the tooltip + /// Instance of Tooltip + get + { + return this.tooltip; + + } + /// The method to set the value to tooltip + /// Instance of Tooltip + set + { + this.tooltip=value; + + this.keyModified["tooltip"] = 1; + + } + } + + public Fields.HistoryTracking HistoryTracking + { + /// The method to get the historyTracking + /// Instance of HistoryTracking + get + { + return this.historyTracking; + + } + /// The method to set the value to historyTracking + /// Instance of HistoryTracking + set + { + this.historyTracking=value; + + this.keyModified["history_tracking"] = 1; + + } + } + + public Fields.AssociationDetails AssociationDetails + { + /// The method to get the associationDetails + /// Instance of AssociationDetails + get + { + return this.associationDetails; + + } + /// The method to set the value to associationDetails + /// Instance of AssociationDetails + set + { + this.associationDetails=value; + + this.keyModified["association_details"] = 1; + + } + } + + public string AdditionalColumn + { + /// The method to get the additionalColumn + /// string representing the additionalColumn + get + { + return this.additionalColumn; + + } + /// The method to set the value to additionalColumn + /// string + set + { + this.additionalColumn=value; + + this.keyModified["additional_column"] = 1; + + } + } + + public string FieldLabel + { + /// The method to get the fieldLabel + /// string representing the fieldLabel + get + { + return this.fieldLabel; + + } + /// The method to set the value to fieldLabel + /// string + set + { + this.fieldLabel=value; + + this.keyModified["field_label"] = 1; + + } + } + + public object GlobalPicklist + { + /// The method to get the globalPicklist + /// object representing the globalPicklist + get + { + return this.globalPicklist; + + } + /// The method to set the value to globalPicklist + /// object + set + { + this.globalPicklist=value; + + this.keyModified["global_picklist"] = 1; + + } + } + + public bool? Updateexistingrecords + { + /// The method to get the updateexistingrecords + /// bool? representing the updateexistingrecords + get + { + return this.updateexistingrecords; + + } + /// The method to set the value to updateexistingrecords + /// bool? + set + { + this.updateexistingrecords=value; + + this.keyModified["_update_existing_records"] = 1; + + } + } + + public bool? NumberSeparator + { + /// The method to get the numberSeparator + /// bool? representing the numberSeparator + get + { + return this.numberSeparator; + + } + /// The method to set the value to numberSeparator + /// bool? + set + { + this.numberSeparator=value; + + this.keyModified["number_separator"] = 1; + + } + } + + public Fields.Textarea Textarea + { + /// The method to get the textarea + /// Instance of Textarea + get + { + return this.textarea; + + } + /// The method to set the value to textarea + /// Instance of Textarea + set + { + this.textarea=value; + + this.keyModified["textarea"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SectionSubformField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SectionSubformField.cs new file mode 100644 index 0000000..d1caf27 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SectionSubformField.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class SectionSubformField : Model + { + private string module; + private string id; + private MinifiedLayout layout; + private Dictionary keyModified=new Dictionary(); + + public string Module + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public MinifiedLayout Layout + { + /// The method to get the layout + /// Instance of MinifiedLayout + get + { + return this.layout; + + } + /// The method to set the value to layout + /// Instance of MinifiedLayout + set + { + this.layout=value; + + this.keyModified["layout"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Sections.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Sections.cs new file mode 100644 index 0000000..5f82512 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Sections.cs @@ -0,0 +1,290 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class Sections : Model + { + private string displayLabel; + private int? sequenceNumber; + private bool? issubformsection; + private string tabTraversal; + private string apiName; + private int? columnCount; + private string name; + private string generatedType; + private long? id; + private string type; + private List fields; + private Properties properties; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public bool? Issubformsection + { + /// The method to get the issubformsection + /// bool? representing the issubformsection + get + { + return this.issubformsection; + + } + /// The method to set the value to issubformsection + /// bool? + set + { + this.issubformsection=value; + + this.keyModified["isSubformSection"] = 1; + + } + } + + public string TabTraversal + { + /// The method to get the tabTraversal + /// string representing the tabTraversal + get + { + return this.tabTraversal; + + } + /// The method to set the value to tabTraversal + /// string + set + { + this.tabTraversal=value; + + this.keyModified["tab_traversal"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public int? ColumnCount + { + /// The method to get the columnCount + /// int? representing the columnCount + get + { + return this.columnCount; + + } + /// The method to set the value to columnCount + /// int? + set + { + this.columnCount=value; + + this.keyModified["column_count"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string GeneratedType + { + /// The method to get the generatedType + /// string representing the generatedType + get + { + return this.generatedType; + + } + /// The method to set the value to generatedType + /// string + set + { + this.generatedType=value; + + this.keyModified["generated_type"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public Properties Properties + { + /// The method to get the properties + /// Instance of Properties + get + { + return this.properties; + + } + /// The method to set the value to properties + /// Instance of Properties + set + { + this.properties=value; + + this.keyModified["properties"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/StaticValues.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/StaticValues.cs new file mode 100644 index 0000000..41681ac --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/StaticValues.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class StaticValues : Model + { + private int? sequenceNumber; + private long? id; + private string value; + private Dictionary keyModified=new Dictionary(); + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SubformProperty.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SubformProperty.cs new file mode 100644 index 0000000..22f450f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SubformProperty.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class SubformProperty : Model + { + private bool? pinnedColumn; + private Dictionary keyModified=new Dictionary(); + + public bool? PinnedColumn + { + /// The method to get the pinnedColumn + /// bool? representing the pinnedColumn + get + { + return this.pinnedColumn; + + } + /// The method to set the value to pinnedColumn + /// bool? + set + { + this.pinnedColumn=value; + + this.keyModified["pinned_column"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SuccessResponse.cs new file mode 100644 index 0000000..56e493a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Tooltip.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Tooltip.cs new file mode 100644 index 0000000..6ad8243 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Layouts/Tooltip.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Layouts +{ + + public class Tooltip : Model + { + private Choice name; + private string value; + private Dictionary keyModified=new Dictionary(); + + public Choice Name + { + /// The method to get the name + /// Instance of Choice + get + { + return this.name; + + } + /// The method to set the value to name + /// Instance of Choice + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/APIException.cs new file mode 100644 index 0000000..d721c86 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class APIException : Model, ActionHandler, ActionResponse, DownloadResponseHandler, SignActionHandler, SignActionResponse + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionHandler.cs new file mode 100644 index 0000000..fb37553 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MailMerge +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionResponse.cs new file mode 100644 index 0000000..0f6708f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MailMerge +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionWrapper.cs new file mode 100644 index 0000000..34c8e82 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class ActionWrapper : Model, ActionHandler + { + private List sendMailMerge; + private Dictionary keyModified=new Dictionary(); + + public List SendMailMerge + { + /// The method to get the sendMailMerge + /// Instance of List + get + { + return this.sendMailMerge; + + } + /// The method to set the value to sendMailMerge + /// Instance of List + set + { + this.sendMailMerge=value; + + this.keyModified["send_mail_merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/Address.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/Address.cs new file mode 100644 index 0000000..6caa9cd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/Address.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class Address : Model + { + private string type; + private string value; + private Dictionary keyModified=new Dictionary(); + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadMailMerge.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadMailMerge.cs new file mode 100644 index 0000000..6ba3f0d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadMailMerge.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class DownloadMailMerge : Model + { + private MailMergeTemplate mailMergeTemplate; + private Choice outputFormat; + private string fileName; + private string password; + private Dictionary keyModified=new Dictionary(); + + public MailMergeTemplate MailMergeTemplate + { + /// The method to get the mailMergeTemplate + /// Instance of MailMergeTemplate + get + { + return this.mailMergeTemplate; + + } + /// The method to set the value to mailMergeTemplate + /// Instance of MailMergeTemplate + set + { + this.mailMergeTemplate=value; + + this.keyModified["mail_merge_template"] = 1; + + } + } + + public Choice OutputFormat + { + /// The method to get the outputFormat + /// Instance of Choice + get + { + return this.outputFormat; + + } + /// The method to set the value to outputFormat + /// Instance of Choice + set + { + this.outputFormat=value; + + this.keyModified["output_format"] = 1; + + } + } + + public string FileName + { + /// The method to get the fileName + /// string representing the fileName + get + { + return this.fileName; + + } + /// The method to set the value to fileName + /// string + set + { + this.fileName=value; + + this.keyModified["file_name"] = 1; + + } + } + + public string Password + { + /// The method to get the password + /// string representing the password + get + { + return this.password; + + } + /// The method to set the value to password + /// string + set + { + this.password=value; + + this.keyModified["password"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadMailMergeWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadMailMergeWrapper.cs new file mode 100644 index 0000000..7577043 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadMailMergeWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class DownloadMailMergeWrapper : Model + { + private List downloadMailMerge; + private Dictionary keyModified=new Dictionary(); + + public List DownloadMailMerge + { + /// The method to get the downloadMailMerge + /// Instance of List + get + { + return this.downloadMailMerge; + + } + /// The method to set the value to downloadMailMerge + /// Instance of List + set + { + this.downloadMailMerge=value; + + this.keyModified["download_mail_merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadResponseHandler.cs new file mode 100644 index 0000000..319ab78 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/DownloadResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MailMerge +{ + + public interface DownloadResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/FileBodyWrapper.cs new file mode 100644 index 0000000..77f0679 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class FileBodyWrapper : Model, DownloadResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMerge.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMerge.cs new file mode 100644 index 0000000..9cfd5c2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMerge.cs @@ -0,0 +1,227 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class MailMerge : Model + { + private MailMergeTemplate mailMergeTemplate; + private Address fromAddress; + private List
toAddress; + private List
ccEmail; + private List
bccEmail; + private string subject; + private string message; + private string type; + private string attachmentName; + private Dictionary keyModified=new Dictionary(); + + public MailMergeTemplate MailMergeTemplate + { + /// The method to get the mailMergeTemplate + /// Instance of MailMergeTemplate + get + { + return this.mailMergeTemplate; + + } + /// The method to set the value to mailMergeTemplate + /// Instance of MailMergeTemplate + set + { + this.mailMergeTemplate=value; + + this.keyModified["mail_merge_template"] = 1; + + } + } + + public Address FromAddress + { + /// The method to get the fromAddress + /// Instance of Address + get + { + return this.fromAddress; + + } + /// The method to set the value to fromAddress + /// Instance of Address + set + { + this.fromAddress=value; + + this.keyModified["from_address"] = 1; + + } + } + + public List
ToAddress + { + /// The method to get the toAddress + /// Instance of List
+ get + { + return this.toAddress; + + } + /// The method to set the value to toAddress + /// Instance of List
+ set + { + this.toAddress=value; + + this.keyModified["to_address"] = 1; + + } + } + + public List
CcEmail + { + /// The method to get the ccEmail + /// Instance of List
+ get + { + return this.ccEmail; + + } + /// The method to set the value to ccEmail + /// Instance of List
+ set + { + this.ccEmail=value; + + this.keyModified["cc_email"] = 1; + + } + } + + public List
BccEmail + { + /// The method to get the bccEmail + /// Instance of List
+ get + { + return this.bccEmail; + + } + /// The method to set the value to bccEmail + /// Instance of List
+ set + { + this.bccEmail=value; + + this.keyModified["bcc_email"] = 1; + + } + } + + public string Subject + { + /// The method to get the subject + /// string representing the subject + get + { + return this.subject; + + } + /// The method to set the value to subject + /// string + set + { + this.subject=value; + + this.keyModified["subject"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string AttachmentName + { + /// The method to get the attachmentName + /// string representing the attachmentName + get + { + return this.attachmentName; + + } + /// The method to set the value to attachmentName + /// string + set + { + this.attachmentName=value; + + this.keyModified["attachment_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeOperations.cs new file mode 100644 index 0000000..e50f167 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeOperations.cs @@ -0,0 +1,134 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class MailMergeOperations + { + private string id; + private string module; + + /// /// Creates an instance of MailMergeOperations with the given parameters + /// string + /// string + + public MailMergeOperations(string module, string id) + { + this.module=module; + + this.id=id; + + + } + + /// The method to send mail merge + /// Instance of MailMergeWrapper + /// Instance of APIResponse + public APIResponse SendMailMerge(MailMergeWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/send_mail_merge"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to download mail merge + /// Instance of DownloadMailMergeWrapper + /// Instance of APIResponse + public APIResponse DownloadMailMerge(DownloadMailMergeWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/download_mail_merge"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(DownloadResponseHandler), "application/json"); + + + } + + /// The method to sign mail merge + /// Instance of SignMailMergeWrapper + /// Instance of APIResponse + public APIResponse SignMailMerge(SignMailMergeWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, this.id.ToString()); + + apiPath=string.Concat(apiPath, "/actions/sign_mail_merge"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(SignActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeTemplate.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeTemplate.cs new file mode 100644 index 0000000..a051c33 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeTemplate.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class MailMergeTemplate : Model + { + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeWrapper.cs new file mode 100644 index 0000000..01af660 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/MailMergeWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class MailMergeWrapper : Model + { + private List sendMailMerge; + private Dictionary keyModified=new Dictionary(); + + public List SendMailMerge + { + /// The method to get the sendMailMerge + /// Instance of List + get + { + return this.sendMailMerge; + + } + /// The method to set the value to sendMailMerge + /// Instance of List + set + { + this.sendMailMerge=value; + + this.keyModified["send_mail_merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionHandler.cs new file mode 100644 index 0000000..b6d9f7c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MailMerge +{ + + public interface SignActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionResponse.cs new file mode 100644 index 0000000..9a51e9b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MailMerge +{ + + public interface SignActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionWrapper.cs new file mode 100644 index 0000000..6ca958b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class SignActionWrapper : Model, SignActionHandler + { + private List signMailMerge; + private Dictionary keyModified=new Dictionary(); + + public List SignMailMerge + { + /// The method to get the signMailMerge + /// Instance of List + get + { + return this.signMailMerge; + + } + /// The method to set the value to signMailMerge + /// Instance of List + set + { + this.signMailMerge=value; + + this.keyModified["sign_mail_merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignMailMerge.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignMailMerge.cs new file mode 100644 index 0000000..87ca770 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignMailMerge.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class SignMailMerge : Model + { + private MailMergeTemplate mailMergeTemplate; + private bool? signInOrder; + private string fileName; + private List signers; + private Dictionary keyModified=new Dictionary(); + + public MailMergeTemplate MailMergeTemplate + { + /// The method to get the mailMergeTemplate + /// Instance of MailMergeTemplate + get + { + return this.mailMergeTemplate; + + } + /// The method to set the value to mailMergeTemplate + /// Instance of MailMergeTemplate + set + { + this.mailMergeTemplate=value; + + this.keyModified["mail_merge_template"] = 1; + + } + } + + public bool? SignInOrder + { + /// The method to get the signInOrder + /// bool? representing the signInOrder + get + { + return this.signInOrder; + + } + /// The method to set the value to signInOrder + /// bool? + set + { + this.signInOrder=value; + + this.keyModified["sign_in_order"] = 1; + + } + } + + public string FileName + { + /// The method to get the fileName + /// string representing the fileName + get + { + return this.fileName; + + } + /// The method to set the value to fileName + /// string + set + { + this.fileName=value; + + this.keyModified["file_name"] = 1; + + } + } + + public List Signers + { + /// The method to get the signers + /// Instance of List + get + { + return this.signers; + + } + /// The method to set the value to signers + /// Instance of List + set + { + this.signers=value; + + this.keyModified["signers"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignMailMergeWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignMailMergeWrapper.cs new file mode 100644 index 0000000..2e26504 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SignMailMergeWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class SignMailMergeWrapper : Model + { + private List signMailMerge; + private Dictionary keyModified=new Dictionary(); + + public List SignMailMerge + { + /// The method to get the signMailMerge + /// Instance of List + get + { + return this.signMailMerge; + + } + /// The method to set the value to signMailMerge + /// Instance of List + set + { + this.signMailMerge=value; + + this.keyModified["sign_mail_merge"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/Signers.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/Signers.cs new file mode 100644 index 0000000..2d1cf16 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/Signers.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class Signers : Model + { + private string recipientName; + private Choice actionType; + private Address recipient; + private Dictionary keyModified=new Dictionary(); + + public string RecipientName + { + /// The method to get the recipientName + /// string representing the recipientName + get + { + return this.recipientName; + + } + /// The method to set the value to recipientName + /// string + set + { + this.recipientName=value; + + this.keyModified["recipient_name"] = 1; + + } + } + + public Choice ActionType + { + /// The method to get the actionType + /// Instance of Choice + get + { + return this.actionType; + + } + /// The method to set the value to actionType + /// Instance of Choice + set + { + this.actionType=value; + + this.keyModified["action_type"] = 1; + + } + } + + public Address Recipient + { + /// The method to get the recipient + /// Instance of Address + get + { + return this.recipient; + + } + /// The method to set the value to recipient + /// Instance of Address + set + { + this.recipient=value; + + this.keyModified["recipient"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SuccessResponse.cs new file mode 100644 index 0000000..e97d90a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MailMerge/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MailMerge +{ + + public class SuccessResponse : Model, SignActionResponse, ActionResponse + { + private Choice code; + private Choice status; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/APIException.cs new file mode 100644 index 0000000..85c8844 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class APIException : Model, ActionHandler, ResponseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionHandler.cs new file mode 100644 index 0000000..0c1b2a0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionResponse.cs new file mode 100644 index 0000000..e86a41c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionWrapper.cs new file mode 100644 index 0000000..aa09924 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/BodyWrapper.cs new file mode 100644 index 0000000..41a1e3a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/BodyWrapper.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class BodyWrapper : Model + { + private long? cvid; + private Owner owner; + private Criteria criteria; + private Territory territory; + private Dictionary keyModified=new Dictionary(); + + public long? Cvid + { + /// The method to get the cvid + /// long? representing the cvid + get + { + return this.cvid; + + } + /// The method to set the value to cvid + /// long? + set + { + this.cvid=value; + + this.keyModified["cvid"] = 1; + + } + } + + public Owner Owner + { + /// The method to get the owner + /// Instance of Owner + get + { + return this.owner; + + } + /// The method to set the value to owner + /// Instance of Owner + set + { + this.owner=value; + + this.keyModified["owner"] = 1; + + } + } + + public Criteria Criteria + { + /// The method to get the criteria + /// Instance of Criteria + get + { + return this.criteria; + + } + /// The method to set the value to criteria + /// Instance of Criteria + set + { + this.criteria=value; + + this.keyModified["criteria"] = 1; + + } + } + + public Territory Territory + { + /// The method to get the territory + /// Instance of Territory + get + { + return this.territory; + + } + /// The method to set the value to territory + /// Instance of Territory + set + { + this.territory=value; + + this.keyModified["territory"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Criteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Criteria.cs new file mode 100644 index 0000000..103463b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Criteria.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class Criteria : Model + { + private string comparator; + private Field field; + private object value; + private string groupOperator; + private List group; + private Dictionary keyModified=new Dictionary(); + + public string Comparator + { + /// The method to get the comparator + /// string representing the comparator + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// string + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + public string GroupOperator + { + /// The method to get the groupOperator + /// string representing the groupOperator + get + { + return this.groupOperator; + + } + /// The method to set the value to groupOperator + /// string + set + { + this.groupOperator=value; + + this.keyModified["group_operator"] = 1; + + } + } + + public List Group + { + /// The method to get the group + /// Instance of List + get + { + return this.group; + + } + /// The method to set the value to group + /// Instance of List + set + { + this.group=value; + + this.keyModified["group"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Field.cs new file mode 100644 index 0000000..79f46ba --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Field.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class Field : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/MassChangeOwnerOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/MassChangeOwnerOperations.cs new file mode 100644 index 0000000..18ec53a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/MassChangeOwnerOperations.cs @@ -0,0 +1,86 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class MassChangeOwnerOperations + { + private string module; + + /// /// Creates an instance of MassChangeOwnerOperations with the given parameters + /// string + + public MassChangeOwnerOperations(string module) + { + this.module=module; + + + } + + /// The method to change owner + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse ChangeOwner(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/mass_change_owner"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to check status + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse CheckStatus(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/mass_change_owner"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class CheckStatusParam + { + public static readonly Param JOB_ID=new Param("job_id", "com.zoho.crm.api.MassChangeOwner.CheckStatusParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Owner.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Owner.cs new file mode 100644 index 0000000..580c305 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Owner.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class Owner : Model + { + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ResponseHandler.cs new file mode 100644 index 0000000..b888bd3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ResponseWrapper.cs new file mode 100644 index 0000000..9c19026 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Status.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Status.cs new file mode 100644 index 0000000..cda0b13 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Status.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class Status : Model + { + private Choice status; + private int? failedCount; + private int? notUpdatedCount; + private int? updatedCount; + private int? totalCount; + private Dictionary keyModified=new Dictionary(); + + public Choice Status_1 + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["Status"] = 1; + + } + } + + public int? FailedCount + { + /// The method to get the failedCount + /// int? representing the failedCount + get + { + return this.failedCount; + + } + /// The method to set the value to failedCount + /// int? + set + { + this.failedCount=value; + + this.keyModified["Failed_Count"] = 1; + + } + } + + public int? NotUpdatedCount + { + /// The method to get the notUpdatedCount + /// int? representing the notUpdatedCount + get + { + return this.notUpdatedCount; + + } + /// The method to set the value to notUpdatedCount + /// int? + set + { + this.notUpdatedCount=value; + + this.keyModified["Not_Updated_Count"] = 1; + + } + } + + public int? UpdatedCount + { + /// The method to get the updatedCount + /// int? representing the updatedCount + get + { + return this.updatedCount; + + } + /// The method to set the value to updatedCount + /// int? + set + { + this.updatedCount=value; + + this.keyModified["Updated_Count"] = 1; + + } + } + + public int? TotalCount + { + /// The method to get the totalCount + /// int? representing the totalCount + get + { + return this.totalCount; + + } + /// The method to set the value to totalCount + /// int? + set + { + this.totalCount=value; + + this.keyModified["Total_Count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/SuccessResponse.cs new file mode 100644 index 0000000..614f2a6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Territory.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Territory.cs new file mode 100644 index 0000000..e7e8db5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassChangeOwner/Territory.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassChangeOwner +{ + + public class Territory : Model + { + private long? id; + private bool? includeChild; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? IncludeChild + { + /// The method to get the includeChild + /// bool? representing the includeChild + get + { + return this.includeChild; + + } + /// The method to set the value to includeChild + /// bool? + set + { + this.includeChild=value; + + this.keyModified["include_child"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/APIException.cs new file mode 100644 index 0000000..ffc1436 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class APIException : Model, ActionResponse, ResponseHandler + { + private Dictionary details; + private Choice code; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ActionResponse.cs new file mode 100644 index 0000000..63d7518 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassConvert +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/AssignTo.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/AssignTo.cs new file mode 100644 index 0000000..987bde9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/AssignTo.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class AssignTo : Model + { + private long? id; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/BodyWrapper.cs new file mode 100644 index 0000000..5118a2d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/BodyWrapper.cs @@ -0,0 +1,207 @@ +using Com.Zoho.Crm.API.Record; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class BodyWrapper : Model + { + private Record.Record deals; + private MoveAttachmentsTo moveAttachmentsTo; + private AssignTo assignTo; + private List carryOverTags; + private List relatedModules; + private PortalUserType portalUserType; + private List ids; + private bool? applyAssignmentThreshold; + private Dictionary keyModified=new Dictionary(); + + public Record.Record Deals + { + /// The method to get the deals + /// Instance of Record + get + { + return this.deals; + + } + /// The method to set the value to deals + /// Instance of Record + set + { + this.deals=value; + + this.keyModified["Deals"] = 1; + + } + } + + public MoveAttachmentsTo MoveAttachmentsTo + { + /// The method to get the moveAttachmentsTo + /// Instance of MoveAttachmentsTo + get + { + return this.moveAttachmentsTo; + + } + /// The method to set the value to moveAttachmentsTo + /// Instance of MoveAttachmentsTo + set + { + this.moveAttachmentsTo=value; + + this.keyModified["move_attachments_to"] = 1; + + } + } + + public AssignTo AssignTo + { + /// The method to get the assignTo + /// Instance of AssignTo + get + { + return this.assignTo; + + } + /// The method to set the value to assignTo + /// Instance of AssignTo + set + { + this.assignTo=value; + + this.keyModified["assign_to"] = 1; + + } + } + + public List CarryOverTags + { + /// The method to get the carryOverTags + /// Instance of List + get + { + return this.carryOverTags; + + } + /// The method to set the value to carryOverTags + /// Instance of List + set + { + this.carryOverTags=value; + + this.keyModified["carry_over_tags"] = 1; + + } + } + + public List RelatedModules + { + /// The method to get the relatedModules + /// Instance of List + get + { + return this.relatedModules; + + } + /// The method to set the value to relatedModules + /// Instance of List + set + { + this.relatedModules=value; + + this.keyModified["related_modules"] = 1; + + } + } + + public PortalUserType PortalUserType + { + /// The method to get the portalUserType + /// Instance of PortalUserType + get + { + return this.portalUserType; + + } + /// The method to set the value to portalUserType + /// Instance of PortalUserType + set + { + this.portalUserType=value; + + this.keyModified["portal_user_type"] = 1; + + } + } + + public List Ids + { + /// The method to get the ids + /// Instance of List + get + { + return this.ids; + + } + /// The method to set the value to ids + /// Instance of List + set + { + this.ids=value; + + this.keyModified["ids"] = 1; + + } + } + + public bool? ApplyAssignmentThreshold + { + /// The method to get the applyAssignmentThreshold + /// bool? representing the applyAssignmentThreshold + get + { + return this.applyAssignmentThreshold; + + } + /// The method to set the value to applyAssignmentThreshold + /// bool? + set + { + this.applyAssignmentThreshold=value; + + this.keyModified["apply_assignment_threshold"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ErrorDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ErrorDetails.cs new file mode 100644 index 0000000..cec7b33 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ErrorDetails.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class ErrorDetails : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/MassConvertOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/MassConvertOperations.cs new file mode 100644 index 0000000..1aa431a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/MassConvertOperations.cs @@ -0,0 +1,72 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class MassConvertOperations + { + /// The method to mass convert + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse MassConvert(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Leads/actions/mass_convert"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.ModuleAPIName="Deals"; + + Utility.GetFields("Deals", handlerInstance); + + return handlerInstance.APICall(typeof(ActionResponse), "application/json"); + + + } + + /// The method to get job status + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetJobStatus(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Leads/actions/mass_convert"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetJobStatusParam + { + public static readonly Param JOB_ID=new Param("job_id", "com.zoho.crm.api.MassConvert.GetJobStatusParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/MoveAttachmentsTo.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/MoveAttachmentsTo.cs new file mode 100644 index 0000000..23e5c2b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/MoveAttachmentsTo.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class MoveAttachmentsTo : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/PortalUserType.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/PortalUserType.cs new file mode 100644 index 0000000..0c284fd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/PortalUserType.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class PortalUserType : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/RelatedModule.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/RelatedModule.cs new file mode 100644 index 0000000..6285790 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/RelatedModule.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class RelatedModule : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ResponseHandler.cs new file mode 100644 index 0000000..2442511 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassConvert +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ResponseWrapper.cs new file mode 100644 index 0000000..fa7e6bb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/Status.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/Status.cs new file mode 100644 index 0000000..aaffee4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/Status.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class Status : Model + { + private string status; + private int? failedCount; + private int? notConvertedCount; + private int? totalCount; + private int? convertedCount; + private Dictionary keyModified=new Dictionary(); + + public string Status_1 + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["Status"] = 1; + + } + } + + public int? FailedCount + { + /// The method to get the failedCount + /// int? representing the failedCount + get + { + return this.failedCount; + + } + /// The method to set the value to failedCount + /// int? + set + { + this.failedCount=value; + + this.keyModified["Failed_Count"] = 1; + + } + } + + public int? NotConvertedCount + { + /// The method to get the notConvertedCount + /// int? representing the notConvertedCount + get + { + return this.notConvertedCount; + + } + /// The method to set the value to notConvertedCount + /// int? + set + { + this.notConvertedCount=value; + + this.keyModified["Not_Converted_Count"] = 1; + + } + } + + public int? TotalCount + { + /// The method to get the totalCount + /// int? representing the totalCount + get + { + return this.totalCount; + + } + /// The method to set the value to totalCount + /// int? + set + { + this.totalCount=value; + + this.keyModified["Total_Count"] = 1; + + } + } + + public int? ConvertedCount + { + /// The method to get the convertedCount + /// int? representing the convertedCount + get + { + return this.convertedCount; + + } + /// The method to set the value to convertedCount + /// int? + set + { + this.convertedCount=value; + + this.keyModified["Converted_Count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/SuccessResponse.cs new file mode 100644 index 0000000..c8ef09a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassConvert/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassConvert +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/APIException.cs new file mode 100644 index 0000000..5e43184 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class APIException : Model, ActionHandler, ActionResponse, ResponseHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionHandler.cs new file mode 100644 index 0000000..16ae01f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionResponse.cs new file mode 100644 index 0000000..e2dd80d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionWrapper.cs new file mode 100644 index 0000000..05d26e2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/CvidBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/CvidBodyWrapper.cs new file mode 100644 index 0000000..afb9038 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/CvidBodyWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class CvidBodyWrapper : Model + { + private long? cvid; + private Territory territory; + private Dictionary keyModified=new Dictionary(); + + public long? Cvid + { + /// The method to get the cvid + /// long? representing the cvid + get + { + return this.cvid; + + } + /// The method to set the value to cvid + /// long? + set + { + this.cvid=value; + + this.keyModified["cvid"] = 1; + + } + } + + public Territory Territory + { + /// The method to get the territory + /// Instance of Territory + get + { + return this.territory; + + } + /// The method to set the value to territory + /// Instance of Territory + set + { + this.territory=value; + + this.keyModified["territory"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/MassDeleteCvidOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/MassDeleteCvidOperations.cs new file mode 100644 index 0000000..387d8da --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/MassDeleteCvidOperations.cs @@ -0,0 +1,116 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class MassDeleteCvidOperations + { + private string module; + + /// /// Creates an instance of MassDeleteCvidOperations with the given parameters + /// string + + public MassDeleteCvidOperations(string module) + { + this.module=module; + + + } + + /// The method to mass delete by cvid + /// Instance of CvidBodyWrapper + /// Instance of APIResponse + public APIResponse MassDeleteByCvid(CvidBodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/mass_delete"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to mass delete by record id + /// Instance of RecordIdBodyWrapper + /// Instance of APIResponse + public APIResponse MassDeleteByRecordId(RecordIdBodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/mass_delete"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get mass delete status + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetMassDeleteStatus(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/actions/mass_delete"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetMassDeleteStatusParam + { + public static readonly Param JOB_ID=new Param("job_id", "com.zoho.crm.api.MassDeleteCvid.GetMassDeleteStatusParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/RecordIdBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/RecordIdBodyWrapper.cs new file mode 100644 index 0000000..ddfe504 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/RecordIdBodyWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class RecordIdBodyWrapper : Model + { + private List ids; + private Territory territory; + private Dictionary keyModified=new Dictionary(); + + public List Ids + { + /// The method to get the ids + /// Instance of List + get + { + return this.ids; + + } + /// The method to set the value to ids + /// Instance of List + set + { + this.ids=value; + + this.keyModified["ids"] = 1; + + } + } + + public Territory Territory + { + /// The method to get the territory + /// Instance of Territory + get + { + return this.territory; + + } + /// The method to set the value to territory + /// Instance of Territory + set + { + this.territory=value; + + this.keyModified["territory"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ResponseHandler.cs new file mode 100644 index 0000000..77a8d34 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ResponseWrapper.cs new file mode 100644 index 0000000..41db5e5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/Status.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/Status.cs new file mode 100644 index 0000000..c72d772 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/Status.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class Status : Model + { + private Choice status; + private int? failedCount; + private int? deletedCount; + private int? totalCount; + private Dictionary keyModified=new Dictionary(); + + public Choice Status_1 + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["Status"] = 1; + + } + } + + public int? FailedCount + { + /// The method to get the failedCount + /// int? representing the failedCount + get + { + return this.failedCount; + + } + /// The method to set the value to failedCount + /// int? + set + { + this.failedCount=value; + + this.keyModified["Failed_Count"] = 1; + + } + } + + public int? DeletedCount + { + /// The method to get the deletedCount + /// int? representing the deletedCount + get + { + return this.deletedCount; + + } + /// The method to set the value to deletedCount + /// int? + set + { + this.deletedCount=value; + + this.keyModified["Deleted_Count"] = 1; + + } + } + + public int? TotalCount + { + /// The method to get the totalCount + /// int? representing the totalCount + get + { + return this.totalCount; + + } + /// The method to set the value to totalCount + /// int? + set + { + this.totalCount=value; + + this.keyModified["Total_Count"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/SuccessResponse.cs new file mode 100644 index 0000000..bbd0771 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/Territory.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/Territory.cs new file mode 100644 index 0000000..b1e651f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteCvid/Territory.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteCvid +{ + + public class Territory : Model + { + private long? id; + private bool? includeChild; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? IncludeChild + { + /// The method to get the includeChild + /// bool? representing the includeChild + get + { + return this.includeChild; + + } + /// The method to set the value to includeChild + /// bool? + set + { + this.includeChild=value; + + this.keyModified["include_child"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/APIException.cs new file mode 100644 index 0000000..357f293 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class APIException : Model, StatusActionResponse, ActionResponse, StatusResponseHandler + { + private Choice status; + private Choice code; + private Dictionary details; + private string message; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/ActionResponse.cs new file mode 100644 index 0000000..cc6e9ea --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/BodyWrapper.cs new file mode 100644 index 0000000..f11344d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class BodyWrapper : Model + { + private List massDelete; + private Dictionary keyModified=new Dictionary(); + + public List MassDelete + { + /// The method to get the massDelete + /// Instance of List + get + { + return this.massDelete; + + } + /// The method to set the value to massDelete + /// Instance of List + set + { + this.massDelete=value; + + this.keyModified["mass_delete"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/ErrorDetail1.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/ErrorDetail1.cs new file mode 100644 index 0000000..376c64a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/ErrorDetail1.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class ErrorDetail1 : Model + { + private string apiName; + private string jsonPath; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDelete.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDelete.cs new file mode 100644 index 0000000..25aa507 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDelete.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class MassDelete : Model + { + private Module module; + private List tags; + private Dictionary keyModified=new Dictionary(); + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public List Tags + { + /// The method to get the tags + /// Instance of List + get + { + return this.tags; + + } + /// The method to set the value to tags + /// Instance of List + set + { + this.tags=value; + + this.keyModified["tags"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDeleteDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDeleteDetails.cs new file mode 100644 index 0000000..b22cea8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDeleteDetails.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class MassDeleteDetails : Model, StatusActionResponse + { + private long? jobId; + private int? totalCount; + private int? failedCount; + private int? deletedCount; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public long? JobId + { + /// The method to get the jobId + /// long? representing the jobId + get + { + return this.jobId; + + } + /// The method to set the value to jobId + /// long? + set + { + this.jobId=value; + + this.keyModified["job_id"] = 1; + + } + } + + public int? TotalCount + { + /// The method to get the totalCount + /// int? representing the totalCount + get + { + return this.totalCount; + + } + /// The method to set the value to totalCount + /// int? + set + { + this.totalCount=value; + + this.keyModified["total_count"] = 1; + + } + } + + public int? FailedCount + { + /// The method to get the failedCount + /// int? representing the failedCount + get + { + return this.failedCount; + + } + /// The method to set the value to failedCount + /// int? + set + { + this.failedCount=value; + + this.keyModified["failed_count"] = 1; + + } + } + + public int? DeletedCount + { + /// The method to get the deletedCount + /// int? representing the deletedCount + get + { + return this.deletedCount; + + } + /// The method to set the value to deletedCount + /// int? + set + { + this.deletedCount=value; + + this.keyModified["deleted_count"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDeleteTagsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDeleteTagsOperations.cs new file mode 100644 index 0000000..d0be9fd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/MassDeleteTagsOperations.cs @@ -0,0 +1,66 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class MassDeleteTagsOperations + { + /// The method to mass delete tags + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse MassDeleteTags(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/tags/actions/mass_delete"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionResponse), "application/json"); + + + } + + /// The method to get status + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetStatus(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/tags/actions/mass_delete"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(StatusResponseHandler), "application/json"); + + + } + + + public static class GetStatusParam + { + public static readonly Param JOB_ID=new Param("job_id", "com.zoho.crm.api.MassDeleteTags.GetStatusParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/Module.cs new file mode 100644 index 0000000..d5766c3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class Module : Model + { + private long? id; + private string apiName; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusActionResponse.cs new file mode 100644 index 0000000..7228416 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public interface StatusActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusResponseHandler.cs new file mode 100644 index 0000000..7df9dcc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public interface StatusResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusResponseWrapper.cs new file mode 100644 index 0000000..478ad6b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/StatusResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class StatusResponseWrapper : Model, StatusResponseHandler + { + private List massDelete; + private Dictionary keyModified=new Dictionary(); + + public List MassDelete + { + /// The method to get the massDelete + /// Instance of List + get + { + return this.massDelete; + + } + /// The method to set the value to massDelete + /// Instance of List + set + { + this.massDelete=value; + + this.keyModified["mass_delete"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/SuccessResponse.cs new file mode 100644 index 0000000..469f21c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/Tag.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/Tag.cs new file mode 100644 index 0000000..aaa1912 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/MassDeleteTags/Tag.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.MassDeleteTags +{ + + public class Tag : Model + { + private long? id; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/APIException.cs new file mode 100644 index 0000000..e7a2864 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private Dictionary details; + private string message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionHandler.cs new file mode 100644 index 0000000..777585d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Modules +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionResponse.cs new file mode 100644 index 0000000..39dacb8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Modules +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionWrapper.cs new file mode 100644 index 0000000..7962d1c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class ActionWrapper : Model, ActionHandler + { + private List modules; + private Dictionary keyModified=new Dictionary(); + + public List Modules + { + /// The method to get the modules + /// Instance of List + get + { + return this.modules; + + } + /// The method to set the value to modules + /// Instance of List + set + { + this.modules=value; + + this.keyModified["modules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Argument.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Argument.cs new file mode 100644 index 0000000..acd065e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Argument.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class Argument : Model + { + private string name; + private string value; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Value + { + /// The method to get the value + /// string representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// string + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/BodyWrapper.cs new file mode 100644 index 0000000..bfb2755 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class BodyWrapper : Model + { + private List modules; + private Dictionary keyModified=new Dictionary(); + + public List Modules + { + /// The method to get the modules + /// Instance of List + get + { + return this.modules; + + } + /// The method to set the value to modules + /// Instance of List + set + { + this.modules=value; + + this.keyModified["modules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/LookupField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/LookupField.cs new file mode 100644 index 0000000..f81f707 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/LookupField.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class LookupField : Fields.MinifiedField , Model + { + private int? sequenceNumber; + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/LookupFieldProperties.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/LookupFieldProperties.cs new file mode 100644 index 0000000..0f9c3e5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/LookupFieldProperties.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class LookupFieldProperties : Model + { + private List fields; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/MinifiedModule.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/MinifiedModule.cs new file mode 100644 index 0000000..177ac09 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/MinifiedModule.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class MinifiedModule : Model + { + private string apiName; + private long? id; + private string moduleName; + private string module; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string ModuleName + { + /// The method to get the moduleName + /// string representing the moduleName + get + { + return this.moduleName; + + } + /// The method to set the value to moduleName + /// string + set + { + this.moduleName=value; + + this.keyModified["module_name"] = 1; + + } + } + + public string Module + { + /// The method to get the module + /// string representing the module + get + { + return this.module; + + } + /// The method to set the value to module + /// string + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModuleFieldLookup.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModuleFieldLookup.cs new file mode 100644 index 0000000..7d78dd5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModuleFieldLookup.cs @@ -0,0 +1,186 @@ +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class ModuleFieldLookup : Fields.Lookup , Model + { + private Fields.QueryDetails queryDetails; + private MinifiedModule module; + private string displayLabel; + private string apiName; + private long? id; + private bool? revalidateFilterDuringEdit; + private List showFields; + private Dictionary keyModified=new Dictionary(); + + public Fields.QueryDetails QueryDetails + { + /// The method to get the queryDetails + /// Instance of QueryDetails + get + { + return this.queryDetails; + + } + /// The method to set the value to queryDetails + /// Instance of QueryDetails + set + { + this.queryDetails=value; + + this.keyModified["query_details"] = 1; + + } + } + + public MinifiedModule Module + { + /// The method to get the module + /// Instance of MinifiedModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of MinifiedModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? RevalidateFilterDuringEdit + { + /// The method to get the revalidateFilterDuringEdit + /// bool? representing the revalidateFilterDuringEdit + get + { + return this.revalidateFilterDuringEdit; + + } + /// The method to set the value to revalidateFilterDuringEdit + /// bool? + set + { + this.revalidateFilterDuringEdit=value; + + this.keyModified["revalidate_filter_during_edit"] = 1; + + } + } + + public List ShowFields + { + /// The method to get the showFields + /// Instance of List + get + { + return this.showFields; + + } + /// The method to set the value to showFields + /// Instance of List + set + { + this.showFields=value; + + this.keyModified["show_fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModuleFields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModuleFields.cs new file mode 100644 index 0000000..1d25099 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModuleFields.cs @@ -0,0 +1,1678 @@ +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class ModuleFields : Fields.Fields , Model + { + private bool? blueprintSupported; + private string jsonType; + private int? length; + private int? decimalPlace; + private Fields.MultiModuleLookup multiModuleLookup; + private SharingProperties sharingProperties; + private Fields.Currency currency; + private List fileUpoladOptionlist; + private Fields.Lookup lookup; + private Fields.Subform subform; + private Fields.Formula formula; + private Fields.Multiselectlookup multiselectlookup; + private Fields.Multiselectlookup multiuserlookup; + private List pickListValues; + private List allowedModules; + private bool? hipaaComplianceEnabled; + private Fields.HipaaCompliance hipaaCompliance; + private MinifiedModule associatedModule; + private string dataType; + private Fields.OperationType operationType; + private bool? systemMandatory; + private bool? webhook; + private int? sequenceNumber; + private string defaultValue; + private bool? virtualField; + private bool? fieldReadOnly; + private List customizableProperties; + private bool? readOnly; + private bool? customField; + private bool? businesscardSupported; + private bool? filterable; + private bool? visible; + private bool? availableInUserLayout; + private bool? displayField; + private bool? pickListValuesSortedLexically; + private bool? sortable; + private List layoutAssociations; + private bool? separator; + private bool? searchable; + private bool? enableColourCode; + private bool? massUpdate; + private string createdSource; + private string type; + private string displayLabel; + private string columnName; + private string apiName; + private int? displayType; + private int? uiType; + private bool? colourCodeEnabledBySystem; + private string quickSequenceNumber; + private Fields.EmailParser emailParser; + private Fields.RollupSummary rollupSummary; + private Fields.ReferFromField referFromField; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private int? showType; + private int? category; + private long? id; + private List profiles; + private Fields.ViewType viewType; + private Fields.Unique unique; + private MinifiedModule subModule; + private Fields.External external; + private Fields.Private private1; + private Fields.ConvertMapping convertMapping; + private Fields.AutoNumber autonumber; + private Fields.AutoNumber autoNumber65; + private Fields.Crypt crypt; + private Fields.Tooltip tooltip; + private Fields.HistoryTracking historyTracking; + private Fields.AssociationDetails associationDetails; + private string additionalColumn; + private string fieldLabel; + private object globalPicklist; + private bool? updateexistingrecords; + private bool? numberSeparator; + private Fields.Textarea textarea; + private bool? staticField; + private Dictionary keyModified=new Dictionary(); + + public bool? BlueprintSupported + { + /// The method to get the blueprintSupported + /// bool? representing the blueprintSupported + get + { + return this.blueprintSupported; + + } + /// The method to set the value to blueprintSupported + /// bool? + set + { + this.blueprintSupported=value; + + this.keyModified["blueprint_supported"] = 1; + + } + } + + public string JsonType + { + /// The method to get the jsonType + /// string representing the jsonType + get + { + return this.jsonType; + + } + /// The method to set the value to jsonType + /// string + set + { + this.jsonType=value; + + this.keyModified["json_type"] = 1; + + } + } + + public int? Length + { + /// The method to get the length + /// int? representing the length + get + { + return this.length; + + } + /// The method to set the value to length + /// int? + set + { + this.length=value; + + this.keyModified["length"] = 1; + + } + } + + public int? DecimalPlace + { + /// The method to get the decimalPlace + /// int? representing the decimalPlace + get + { + return this.decimalPlace; + + } + /// The method to set the value to decimalPlace + /// int? + set + { + this.decimalPlace=value; + + this.keyModified["decimal_place"] = 1; + + } + } + + public Fields.MultiModuleLookup MultiModuleLookup + { + /// The method to get the multiModuleLookup + /// Instance of MultiModuleLookup + get + { + return this.multiModuleLookup; + + } + /// The method to set the value to multiModuleLookup + /// Instance of MultiModuleLookup + set + { + this.multiModuleLookup=value; + + this.keyModified["multi_module_lookup"] = 1; + + } + } + + public SharingProperties SharingProperties + { + /// The method to get the sharingProperties + /// Instance of SharingProperties + get + { + return this.sharingProperties; + + } + /// The method to set the value to sharingProperties + /// Instance of SharingProperties + set + { + this.sharingProperties=value; + + this.keyModified["sharing_properties"] = 1; + + } + } + + public Fields.Currency Currency + { + /// The method to get the currency + /// Instance of Currency + get + { + return this.currency; + + } + /// The method to set the value to currency + /// Instance of Currency + set + { + this.currency=value; + + this.keyModified["currency"] = 1; + + } + } + + public List FileUpoladOptionlist + { + /// The method to get the fileUpoladOptionlist + /// Instance of List + get + { + return this.fileUpoladOptionlist; + + } + /// The method to set the value to fileUpoladOptionlist + /// Instance of List + set + { + this.fileUpoladOptionlist=value; + + this.keyModified["file_upolad_optionlist"] = 1; + + } + } + + public Fields.Lookup Lookup + { + /// The method to get the lookup + /// Instance of Lookup + get + { + return this.lookup; + + } + /// The method to set the value to lookup + /// Instance of Lookup + set + { + this.lookup=value; + + this.keyModified["lookup"] = 1; + + } + } + + public Fields.Subform Subform + { + /// The method to get the subform + /// Instance of Subform + get + { + return this.subform; + + } + /// The method to set the value to subform + /// Instance of Subform + set + { + this.subform=value; + + this.keyModified["subform"] = 1; + + } + } + + public Fields.Formula Formula + { + /// The method to get the formula + /// Instance of Formula + get + { + return this.formula; + + } + /// The method to set the value to formula + /// Instance of Formula + set + { + this.formula=value; + + this.keyModified["formula"] = 1; + + } + } + + public Fields.Multiselectlookup Multiselectlookup + { + /// The method to get the multiselectlookup + /// Instance of Multiselectlookup + get + { + return this.multiselectlookup; + + } + /// The method to set the value to multiselectlookup + /// Instance of Multiselectlookup + set + { + this.multiselectlookup=value; + + this.keyModified["multiselectlookup"] = 1; + + } + } + + public Fields.Multiselectlookup Multiuserlookup + { + /// The method to get the multiuserlookup + /// Instance of Multiselectlookup + get + { + return this.multiuserlookup; + + } + /// The method to set the value to multiuserlookup + /// Instance of Multiselectlookup + set + { + this.multiuserlookup=value; + + this.keyModified["multiuserlookup"] = 1; + + } + } + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + public List AllowedModules + { + /// The method to get the allowedModules + /// Instance of List + get + { + return this.allowedModules; + + } + /// The method to set the value to allowedModules + /// Instance of List + set + { + this.allowedModules=value; + + this.keyModified["allowed_modules"] = 1; + + } + } + + public bool? HipaaComplianceEnabled + { + /// The method to get the hipaaComplianceEnabled + /// bool? representing the hipaaComplianceEnabled + get + { + return this.hipaaComplianceEnabled; + + } + /// The method to set the value to hipaaComplianceEnabled + /// bool? + set + { + this.hipaaComplianceEnabled=value; + + this.keyModified["hipaa_compliance_enabled"] = 1; + + } + } + + public Fields.HipaaCompliance HipaaCompliance + { + /// The method to get the hipaaCompliance + /// Instance of HipaaCompliance + get + { + return this.hipaaCompliance; + + } + /// The method to set the value to hipaaCompliance + /// Instance of HipaaCompliance + set + { + this.hipaaCompliance=value; + + this.keyModified["hipaa_compliance"] = 1; + + } + } + + public MinifiedModule AssociatedModule + { + /// The method to get the associatedModule + /// Instance of MinifiedModule + get + { + return this.associatedModule; + + } + /// The method to set the value to associatedModule + /// Instance of MinifiedModule + set + { + this.associatedModule=value; + + this.keyModified["associated_module"] = 1; + + } + } + + public string DataType + { + /// The method to get the dataType + /// string representing the dataType + get + { + return this.dataType; + + } + /// The method to set the value to dataType + /// string + set + { + this.dataType=value; + + this.keyModified["data_type"] = 1; + + } + } + + public Fields.OperationType OperationType + { + /// The method to get the operationType + /// Instance of OperationType + get + { + return this.operationType; + + } + /// The method to set the value to operationType + /// Instance of OperationType + set + { + this.operationType=value; + + this.keyModified["operation_type"] = 1; + + } + } + + public bool? SystemMandatory + { + /// The method to get the systemMandatory + /// bool? representing the systemMandatory + get + { + return this.systemMandatory; + + } + /// The method to set the value to systemMandatory + /// bool? + set + { + this.systemMandatory=value; + + this.keyModified["system_mandatory"] = 1; + + } + } + + public bool? Webhook + { + /// The method to get the webhook + /// bool? representing the webhook + get + { + return this.webhook; + + } + /// The method to set the value to webhook + /// bool? + set + { + this.webhook=value; + + this.keyModified["webhook"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public string DefaultValue + { + /// The method to get the defaultValue + /// string representing the defaultValue + get + { + return this.defaultValue; + + } + /// The method to set the value to defaultValue + /// string + set + { + this.defaultValue=value; + + this.keyModified["default_value"] = 1; + + } + } + + public bool? VirtualField + { + /// The method to get the virtualField + /// bool? representing the virtualField + get + { + return this.virtualField; + + } + /// The method to set the value to virtualField + /// bool? + set + { + this.virtualField=value; + + this.keyModified["virtual_field"] = 1; + + } + } + + public bool? FieldReadOnly + { + /// The method to get the fieldReadOnly + /// bool? representing the fieldReadOnly + get + { + return this.fieldReadOnly; + + } + /// The method to set the value to fieldReadOnly + /// bool? + set + { + this.fieldReadOnly=value; + + this.keyModified["field_read_only"] = 1; + + } + } + + public List CustomizableProperties + { + /// The method to get the customizableProperties + /// Instance of List + get + { + return this.customizableProperties; + + } + /// The method to set the value to customizableProperties + /// Instance of List + set + { + this.customizableProperties=value; + + this.keyModified["customizable_properties"] = 1; + + } + } + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public bool? CustomField + { + /// The method to get the customField + /// bool? representing the customField + get + { + return this.customField; + + } + /// The method to set the value to customField + /// bool? + set + { + this.customField=value; + + this.keyModified["custom_field"] = 1; + + } + } + + public bool? BusinesscardSupported + { + /// The method to get the businesscardSupported + /// bool? representing the businesscardSupported + get + { + return this.businesscardSupported; + + } + /// The method to set the value to businesscardSupported + /// bool? + set + { + this.businesscardSupported=value; + + this.keyModified["businesscard_supported"] = 1; + + } + } + + public bool? Filterable + { + /// The method to get the filterable + /// bool? representing the filterable + get + { + return this.filterable; + + } + /// The method to set the value to filterable + /// bool? + set + { + this.filterable=value; + + this.keyModified["filterable"] = 1; + + } + } + + public bool? Visible + { + /// The method to get the visible + /// bool? representing the visible + get + { + return this.visible; + + } + /// The method to set the value to visible + /// bool? + set + { + this.visible=value; + + this.keyModified["visible"] = 1; + + } + } + + public bool? AvailableInUserLayout + { + /// The method to get the availableInUserLayout + /// bool? representing the availableInUserLayout + get + { + return this.availableInUserLayout; + + } + /// The method to set the value to availableInUserLayout + /// bool? + set + { + this.availableInUserLayout=value; + + this.keyModified["available_in_user_layout"] = 1; + + } + } + + public bool? DisplayField + { + /// The method to get the displayField + /// bool? representing the displayField + get + { + return this.displayField; + + } + /// The method to set the value to displayField + /// bool? + set + { + this.displayField=value; + + this.keyModified["display_field"] = 1; + + } + } + + public bool? PickListValuesSortedLexically + { + /// The method to get the pickListValuesSortedLexically + /// bool? representing the pickListValuesSortedLexically + get + { + return this.pickListValuesSortedLexically; + + } + /// The method to set the value to pickListValuesSortedLexically + /// bool? + set + { + this.pickListValuesSortedLexically=value; + + this.keyModified["pick_list_values_sorted_lexically"] = 1; + + } + } + + public bool? Sortable + { + /// The method to get the sortable + /// bool? representing the sortable + get + { + return this.sortable; + + } + /// The method to set the value to sortable + /// bool? + set + { + this.sortable=value; + + this.keyModified["sortable"] = 1; + + } + } + + public List LayoutAssociations + { + /// The method to get the layoutAssociations + /// Instance of List + get + { + return this.layoutAssociations; + + } + /// The method to set the value to layoutAssociations + /// Instance of List + set + { + this.layoutAssociations=value; + + this.keyModified["layout_associations"] = 1; + + } + } + + public bool? Separator + { + /// The method to get the separator + /// bool? representing the separator + get + { + return this.separator; + + } + /// The method to set the value to separator + /// bool? + set + { + this.separator=value; + + this.keyModified["separator"] = 1; + + } + } + + public bool? Searchable + { + /// The method to get the searchable + /// bool? representing the searchable + get + { + return this.searchable; + + } + /// The method to set the value to searchable + /// bool? + set + { + this.searchable=value; + + this.keyModified["searchable"] = 1; + + } + } + + public bool? EnableColourCode + { + /// The method to get the enableColourCode + /// bool? representing the enableColourCode + get + { + return this.enableColourCode; + + } + /// The method to set the value to enableColourCode + /// bool? + set + { + this.enableColourCode=value; + + this.keyModified["enable_colour_code"] = 1; + + } + } + + public bool? MassUpdate + { + /// The method to get the massUpdate + /// bool? representing the massUpdate + get + { + return this.massUpdate; + + } + /// The method to set the value to massUpdate + /// bool? + set + { + this.massUpdate=value; + + this.keyModified["mass_update"] = 1; + + } + } + + public string CreatedSource + { + /// The method to get the createdSource + /// string representing the createdSource + get + { + return this.createdSource; + + } + /// The method to set the value to createdSource + /// string + set + { + this.createdSource=value; + + this.keyModified["created_source"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string ColumnName + { + /// The method to get the columnName + /// string representing the columnName + get + { + return this.columnName; + + } + /// The method to set the value to columnName + /// string + set + { + this.columnName=value; + + this.keyModified["column_name"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public int? DisplayType + { + /// The method to get the displayType + /// int? representing the displayType + get + { + return this.displayType; + + } + /// The method to set the value to displayType + /// int? + set + { + this.displayType=value; + + this.keyModified["display_type"] = 1; + + } + } + + public int? UiType + { + /// The method to get the uiType + /// int? representing the uiType + get + { + return this.uiType; + + } + /// The method to set the value to uiType + /// int? + set + { + this.uiType=value; + + this.keyModified["ui_type"] = 1; + + } + } + + public bool? ColourCodeEnabledBySystem + { + /// The method to get the colourCodeEnabledBySystem + /// bool? representing the colourCodeEnabledBySystem + get + { + return this.colourCodeEnabledBySystem; + + } + /// The method to set the value to colourCodeEnabledBySystem + /// bool? + set + { + this.colourCodeEnabledBySystem=value; + + this.keyModified["colour_code_enabled_by_system"] = 1; + + } + } + + public string QuickSequenceNumber + { + /// The method to get the quickSequenceNumber + /// string representing the quickSequenceNumber + get + { + return this.quickSequenceNumber; + + } + /// The method to set the value to quickSequenceNumber + /// string + set + { + this.quickSequenceNumber=value; + + this.keyModified["quick_sequence_number"] = 1; + + } + } + + public Fields.EmailParser EmailParser + { + /// The method to get the emailParser + /// Instance of EmailParser + get + { + return this.emailParser; + + } + /// The method to set the value to emailParser + /// Instance of EmailParser + set + { + this.emailParser=value; + + this.keyModified["email_parser"] = 1; + + } + } + + public Fields.RollupSummary RollupSummary + { + /// The method to get the rollupSummary + /// Instance of RollupSummary + get + { + return this.rollupSummary; + + } + /// The method to set the value to rollupSummary + /// Instance of RollupSummary + set + { + this.rollupSummary=value; + + this.keyModified["rollup_summary"] = 1; + + } + } + + public Fields.ReferFromField ReferFromField + { + /// The method to get the referFromField + /// Instance of ReferFromField + get + { + return this.referFromField; + + } + /// The method to set the value to referFromField + /// Instance of ReferFromField + set + { + this.referFromField=value; + + this.keyModified["refer_from_field"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public int? ShowType + { + /// The method to get the showType + /// int? representing the showType + get + { + return this.showType; + + } + /// The method to set the value to showType + /// int? + set + { + this.showType=value; + + this.keyModified["show_type"] = 1; + + } + } + + public int? Category + { + /// The method to get the category + /// int? representing the category + get + { + return this.category; + + } + /// The method to set the value to category + /// int? + set + { + this.category=value; + + this.keyModified["category"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public List Profiles + { + /// The method to get the profiles + /// Instance of List + get + { + return this.profiles; + + } + /// The method to set the value to profiles + /// Instance of List + set + { + this.profiles=value; + + this.keyModified["profiles"] = 1; + + } + } + + public Fields.ViewType ViewType + { + /// The method to get the viewType + /// Instance of ViewType + get + { + return this.viewType; + + } + /// The method to set the value to viewType + /// Instance of ViewType + set + { + this.viewType=value; + + this.keyModified["view_type"] = 1; + + } + } + + public Fields.Unique Unique + { + /// The method to get the unique + /// Instance of Unique + get + { + return this.unique; + + } + /// The method to set the value to unique + /// Instance of Unique + set + { + this.unique=value; + + this.keyModified["unique"] = 1; + + } + } + + public MinifiedModule SubModule + { + /// The method to get the subModule + /// Instance of MinifiedModule + get + { + return this.subModule; + + } + /// The method to set the value to subModule + /// Instance of MinifiedModule + set + { + this.subModule=value; + + this.keyModified["sub_module"] = 1; + + } + } + + public Fields.External External + { + /// The method to get the external + /// Instance of External + get + { + return this.external; + + } + /// The method to set the value to external + /// Instance of External + set + { + this.external=value; + + this.keyModified["external"] = 1; + + } + } + + public Fields.Private Private + { + /// The method to get the private + /// Instance of Private + get + { + return this.private1; + + } + /// The method to set the value to private + /// Instance of Private + set + { + this.private1=value; + + this.keyModified["private"] = 1; + + } + } + + public Fields.ConvertMapping ConvertMapping + { + /// The method to get the convertMapping + /// Instance of ConvertMapping + get + { + return this.convertMapping; + + } + /// The method to set the value to convertMapping + /// Instance of ConvertMapping + set + { + this.convertMapping=value; + + this.keyModified["convert_mapping"] = 1; + + } + } + + public Fields.AutoNumber Autonumber + { + /// The method to get the autonumber + /// Instance of AutoNumber + get + { + return this.autonumber; + + } + /// The method to set the value to autonumber + /// Instance of AutoNumber + set + { + this.autonumber=value; + + this.keyModified["autonumber"] = 1; + + } + } + + public Fields.AutoNumber AutoNumber65 + { + /// The method to get the autoNumber65 + /// Instance of AutoNumber + get + { + return this.autoNumber65; + + } + /// The method to set the value to autoNumber65 + /// Instance of AutoNumber + set + { + this.autoNumber65=value; + + this.keyModified["auto_number"] = 1; + + } + } + + public Fields.Crypt Crypt + { + /// The method to get the crypt + /// Instance of Crypt + get + { + return this.crypt; + + } + /// The method to set the value to crypt + /// Instance of Crypt + set + { + this.crypt=value; + + this.keyModified["crypt"] = 1; + + } + } + + public Fields.Tooltip Tooltip + { + /// The method to get the tooltip + /// Instance of Tooltip + get + { + return this.tooltip; + + } + /// The method to set the value to tooltip + /// Instance of Tooltip + set + { + this.tooltip=value; + + this.keyModified["tooltip"] = 1; + + } + } + + public Fields.HistoryTracking HistoryTracking + { + /// The method to get the historyTracking + /// Instance of HistoryTracking + get + { + return this.historyTracking; + + } + /// The method to set the value to historyTracking + /// Instance of HistoryTracking + set + { + this.historyTracking=value; + + this.keyModified["history_tracking"] = 1; + + } + } + + public Fields.AssociationDetails AssociationDetails + { + /// The method to get the associationDetails + /// Instance of AssociationDetails + get + { + return this.associationDetails; + + } + /// The method to set the value to associationDetails + /// Instance of AssociationDetails + set + { + this.associationDetails=value; + + this.keyModified["association_details"] = 1; + + } + } + + public string AdditionalColumn + { + /// The method to get the additionalColumn + /// string representing the additionalColumn + get + { + return this.additionalColumn; + + } + /// The method to set the value to additionalColumn + /// string + set + { + this.additionalColumn=value; + + this.keyModified["additional_column"] = 1; + + } + } + + public string FieldLabel + { + /// The method to get the fieldLabel + /// string representing the fieldLabel + get + { + return this.fieldLabel; + + } + /// The method to set the value to fieldLabel + /// string + set + { + this.fieldLabel=value; + + this.keyModified["field_label"] = 1; + + } + } + + public object GlobalPicklist + { + /// The method to get the globalPicklist + /// object representing the globalPicklist + get + { + return this.globalPicklist; + + } + /// The method to set the value to globalPicklist + /// object + set + { + this.globalPicklist=value; + + this.keyModified["global_picklist"] = 1; + + } + } + + public bool? Updateexistingrecords + { + /// The method to get the updateexistingrecords + /// bool? representing the updateexistingrecords + get + { + return this.updateexistingrecords; + + } + /// The method to set the value to updateexistingrecords + /// bool? + set + { + this.updateexistingrecords=value; + + this.keyModified["_update_existing_records"] = 1; + + } + } + + public bool? NumberSeparator + { + /// The method to get the numberSeparator + /// bool? representing the numberSeparator + get + { + return this.numberSeparator; + + } + /// The method to set the value to numberSeparator + /// bool? + set + { + this.numberSeparator=value; + + this.keyModified["number_separator"] = 1; + + } + } + + public Fields.Textarea Textarea + { + /// The method to get the textarea + /// Instance of Textarea + get + { + return this.textarea; + + } + /// The method to set the value to textarea + /// Instance of Textarea + set + { + this.textarea=value; + + this.keyModified["textarea"] = 1; + + } + } + + public bool? StaticField + { + /// The method to get the staticField + /// bool? representing the staticField + get + { + return this.staticField; + + } + /// The method to set the value to staticField + /// bool? + set + { + this.staticField=value; + + this.keyModified["static_field"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Modules.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Modules.cs new file mode 100644 index 0000000..ec737b9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Modules.cs @@ -0,0 +1,1430 @@ +using Com.Zoho.Crm.API.CustomViews; +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Profiles; +using Com.Zoho.Crm.API.RelatedLists; +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class Modules : Model + { + private bool? hasMoreProfiles; + private bool? subMenuAvailable; + private bool? globalSearchSupported; + private bool? deletable; + private string description; + private bool? creatable; + private bool? recycleBinOnDelete; + private bool? inventoryTemplateSupported; + private DateTimeOffset? modifiedTime; + private string pluralLabel; + private bool? presenceSubMenu; + private bool? triggersSupported; + private long? id; + private bool? chartView; + private bool? isblueprintsupported; + private int? visibility; + private bool? visible; + private bool? convertable; + private bool? editable; + private bool? emailtemplateSupport; + private bool? emailParserSupported; + private bool? filterSupported; + private bool? showAsTab; + private string webLink; + private int? sequenceNumber; + private string singularLabel; + private bool? viewable; + private bool? apiSupported; + private string apiName; + private bool? quickCreate; + private Choice generatedType; + private bool? feedsRequired; + private bool? scoringSupported; + private bool? webformSupported; + private Territory territory; + private List arguments; + private string moduleName; + private bool? chartViewSupported; + private int? profileCount; + private int? businessCardFieldLimit; + private bool? trackCurrentData; + private Users.MinifiedUser modifiedBy; + private List profiles; + private MinifiedModule parentModule; + private Choice activityBadge; + private List fieldStates; + private List businessCardFields; + private int? perPage; + private List properties; + private List onDemandProperties; + private List searchLayoutFields; + private bool? kanbanViewSupported; + private LookupFieldProperties lookupFieldProperties; + private bool? kanbanView; + private List relatedLists; + private bool? filterStatus; + private RelatedListProperties relatedListProperties; + private string displayField; + private List layouts; + private List fields; + private CustomViews.CustomViews customView; + private bool? ziaView; + private List defaultMappingFields; + private string status; + private StaticSubformProperties staticSubformProperties; + private List layoutAssociations; + private Dictionary keyModified=new Dictionary(); + + public bool? HasMoreProfiles + { + /// The method to get the hasMoreProfiles + /// bool? representing the hasMoreProfiles + get + { + return this.hasMoreProfiles; + + } + /// The method to set the value to hasMoreProfiles + /// bool? + set + { + this.hasMoreProfiles=value; + + this.keyModified["has_more_profiles"] = 1; + + } + } + + public bool? SubMenuAvailable + { + /// The method to get the subMenuAvailable + /// bool? representing the subMenuAvailable + get + { + return this.subMenuAvailable; + + } + /// The method to set the value to subMenuAvailable + /// bool? + set + { + this.subMenuAvailable=value; + + this.keyModified["sub_menu_available"] = 1; + + } + } + + public bool? GlobalSearchSupported + { + /// The method to get the globalSearchSupported + /// bool? representing the globalSearchSupported + get + { + return this.globalSearchSupported; + + } + /// The method to set the value to globalSearchSupported + /// bool? + set + { + this.globalSearchSupported=value; + + this.keyModified["global_search_supported"] = 1; + + } + } + + public bool? Deletable + { + /// The method to get the deletable + /// bool? representing the deletable + get + { + return this.deletable; + + } + /// The method to set the value to deletable + /// bool? + set + { + this.deletable=value; + + this.keyModified["deletable"] = 1; + + } + } + + public string Description + { + /// The method to get the description + /// string representing the description + get + { + return this.description; + + } + /// The method to set the value to description + /// string + set + { + this.description=value; + + this.keyModified["description"] = 1; + + } + } + + public bool? Creatable + { + /// The method to get the creatable + /// bool? representing the creatable + get + { + return this.creatable; + + } + /// The method to set the value to creatable + /// bool? + set + { + this.creatable=value; + + this.keyModified["creatable"] = 1; + + } + } + + public bool? RecycleBinOnDelete + { + /// The method to get the recycleBinOnDelete + /// bool? representing the recycleBinOnDelete + get + { + return this.recycleBinOnDelete; + + } + /// The method to set the value to recycleBinOnDelete + /// bool? + set + { + this.recycleBinOnDelete=value; + + this.keyModified["recycle_bin_on_delete"] = 1; + + } + } + + public bool? InventoryTemplateSupported + { + /// The method to get the inventoryTemplateSupported + /// bool? representing the inventoryTemplateSupported + get + { + return this.inventoryTemplateSupported; + + } + /// The method to set the value to inventoryTemplateSupported + /// bool? + set + { + this.inventoryTemplateSupported=value; + + this.keyModified["inventory_template_supported"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public string PluralLabel + { + /// The method to get the pluralLabel + /// string representing the pluralLabel + get + { + return this.pluralLabel; + + } + /// The method to set the value to pluralLabel + /// string + set + { + this.pluralLabel=value; + + this.keyModified["plural_label"] = 1; + + } + } + + public bool? PresenceSubMenu + { + /// The method to get the presenceSubMenu + /// bool? representing the presenceSubMenu + get + { + return this.presenceSubMenu; + + } + /// The method to set the value to presenceSubMenu + /// bool? + set + { + this.presenceSubMenu=value; + + this.keyModified["presence_sub_menu"] = 1; + + } + } + + public bool? TriggersSupported + { + /// The method to get the triggersSupported + /// bool? representing the triggersSupported + get + { + return this.triggersSupported; + + } + /// The method to set the value to triggersSupported + /// bool? + set + { + this.triggersSupported=value; + + this.keyModified["triggers_supported"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? ChartView + { + /// The method to get the chartView + /// bool? representing the chartView + get + { + return this.chartView; + + } + /// The method to set the value to chartView + /// bool? + set + { + this.chartView=value; + + this.keyModified["chart_view"] = 1; + + } + } + + public bool? Isblueprintsupported + { + /// The method to get the isblueprintsupported + /// bool? representing the isblueprintsupported + get + { + return this.isblueprintsupported; + + } + /// The method to set the value to isblueprintsupported + /// bool? + set + { + this.isblueprintsupported=value; + + this.keyModified["isBlueprintSupported"] = 1; + + } + } + + public int? Visibility + { + /// The method to get the visibility + /// int? representing the visibility + get + { + return this.visibility; + + } + /// The method to set the value to visibility + /// int? + set + { + this.visibility=value; + + this.keyModified["visibility"] = 1; + + } + } + + public bool? Visible + { + /// The method to get the visible + /// bool? representing the visible + get + { + return this.visible; + + } + /// The method to set the value to visible + /// bool? + set + { + this.visible=value; + + this.keyModified["visible"] = 1; + + } + } + + public bool? Convertable + { + /// The method to get the convertable + /// bool? representing the convertable + get + { + return this.convertable; + + } + /// The method to set the value to convertable + /// bool? + set + { + this.convertable=value; + + this.keyModified["convertable"] = 1; + + } + } + + public bool? Editable + { + /// The method to get the editable + /// bool? representing the editable + get + { + return this.editable; + + } + /// The method to set the value to editable + /// bool? + set + { + this.editable=value; + + this.keyModified["editable"] = 1; + + } + } + + public bool? EmailtemplateSupport + { + /// The method to get the emailtemplateSupport + /// bool? representing the emailtemplateSupport + get + { + return this.emailtemplateSupport; + + } + /// The method to set the value to emailtemplateSupport + /// bool? + set + { + this.emailtemplateSupport=value; + + this.keyModified["emailTemplate_support"] = 1; + + } + } + + public bool? EmailParserSupported + { + /// The method to get the emailParserSupported + /// bool? representing the emailParserSupported + get + { + return this.emailParserSupported; + + } + /// The method to set the value to emailParserSupported + /// bool? + set + { + this.emailParserSupported=value; + + this.keyModified["email_parser_supported"] = 1; + + } + } + + public bool? FilterSupported + { + /// The method to get the filterSupported + /// bool? representing the filterSupported + get + { + return this.filterSupported; + + } + /// The method to set the value to filterSupported + /// bool? + set + { + this.filterSupported=value; + + this.keyModified["filter_supported"] = 1; + + } + } + + public bool? ShowAsTab + { + /// The method to get the showAsTab + /// bool? representing the showAsTab + get + { + return this.showAsTab; + + } + /// The method to set the value to showAsTab + /// bool? + set + { + this.showAsTab=value; + + this.keyModified["show_as_tab"] = 1; + + } + } + + public string WebLink + { + /// The method to get the webLink + /// string representing the webLink + get + { + return this.webLink; + + } + /// The method to set the value to webLink + /// string + set + { + this.webLink=value; + + this.keyModified["web_link"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public string SingularLabel + { + /// The method to get the singularLabel + /// string representing the singularLabel + get + { + return this.singularLabel; + + } + /// The method to set the value to singularLabel + /// string + set + { + this.singularLabel=value; + + this.keyModified["singular_label"] = 1; + + } + } + + public bool? Viewable + { + /// The method to get the viewable + /// bool? representing the viewable + get + { + return this.viewable; + + } + /// The method to set the value to viewable + /// bool? + set + { + this.viewable=value; + + this.keyModified["viewable"] = 1; + + } + } + + public bool? APISupported + { + /// The method to get the aPISupported + /// bool? representing the apiSupported + get + { + return this.apiSupported; + + } + /// The method to set the value to aPISupported + /// bool? + set + { + this.apiSupported=value; + + this.keyModified["api_supported"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public bool? QuickCreate + { + /// The method to get the quickCreate + /// bool? representing the quickCreate + get + { + return this.quickCreate; + + } + /// The method to set the value to quickCreate + /// bool? + set + { + this.quickCreate=value; + + this.keyModified["quick_create"] = 1; + + } + } + + public Choice GeneratedType + { + /// The method to get the generatedType + /// Instance of Choice + get + { + return this.generatedType; + + } + /// The method to set the value to generatedType + /// Instance of Choice + set + { + this.generatedType=value; + + this.keyModified["generated_type"] = 1; + + } + } + + public bool? FeedsRequired + { + /// The method to get the feedsRequired + /// bool? representing the feedsRequired + get + { + return this.feedsRequired; + + } + /// The method to set the value to feedsRequired + /// bool? + set + { + this.feedsRequired=value; + + this.keyModified["feeds_required"] = 1; + + } + } + + public bool? ScoringSupported + { + /// The method to get the scoringSupported + /// bool? representing the scoringSupported + get + { + return this.scoringSupported; + + } + /// The method to set the value to scoringSupported + /// bool? + set + { + this.scoringSupported=value; + + this.keyModified["scoring_supported"] = 1; + + } + } + + public bool? WebformSupported + { + /// The method to get the webformSupported + /// bool? representing the webformSupported + get + { + return this.webformSupported; + + } + /// The method to set the value to webformSupported + /// bool? + set + { + this.webformSupported=value; + + this.keyModified["webform_supported"] = 1; + + } + } + + public Territory Territory + { + /// The method to get the territory + /// Instance of Territory + get + { + return this.territory; + + } + /// The method to set the value to territory + /// Instance of Territory + set + { + this.territory=value; + + this.keyModified["territory"] = 1; + + } + } + + public List Arguments + { + /// The method to get the arguments + /// Instance of List + get + { + return this.arguments; + + } + /// The method to set the value to arguments + /// Instance of List + set + { + this.arguments=value; + + this.keyModified["arguments"] = 1; + + } + } + + public string ModuleName + { + /// The method to get the moduleName + /// string representing the moduleName + get + { + return this.moduleName; + + } + /// The method to set the value to moduleName + /// string + set + { + this.moduleName=value; + + this.keyModified["module_name"] = 1; + + } + } + + public bool? ChartViewSupported + { + /// The method to get the chartViewSupported + /// bool? representing the chartViewSupported + get + { + return this.chartViewSupported; + + } + /// The method to set the value to chartViewSupported + /// bool? + set + { + this.chartViewSupported=value; + + this.keyModified["chart_view_supported"] = 1; + + } + } + + public int? ProfileCount + { + /// The method to get the profileCount + /// int? representing the profileCount + get + { + return this.profileCount; + + } + /// The method to set the value to profileCount + /// int? + set + { + this.profileCount=value; + + this.keyModified["profile_count"] = 1; + + } + } + + public int? BusinessCardFieldLimit + { + /// The method to get the businessCardFieldLimit + /// int? representing the businessCardFieldLimit + get + { + return this.businessCardFieldLimit; + + } + /// The method to set the value to businessCardFieldLimit + /// int? + set + { + this.businessCardFieldLimit=value; + + this.keyModified["business_card_field_limit"] = 1; + + } + } + + public bool? TrackCurrentData + { + /// The method to get the trackCurrentData + /// bool? representing the trackCurrentData + get + { + return this.trackCurrentData; + + } + /// The method to set the value to trackCurrentData + /// bool? + set + { + this.trackCurrentData=value; + + this.keyModified["track_current_data"] = 1; + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public List Profiles + { + /// The method to get the profiles + /// Instance of List + get + { + return this.profiles; + + } + /// The method to set the value to profiles + /// Instance of List + set + { + this.profiles=value; + + this.keyModified["profiles"] = 1; + + } + } + + public MinifiedModule ParentModule + { + /// The method to get the parentModule + /// Instance of MinifiedModule + get + { + return this.parentModule; + + } + /// The method to set the value to parentModule + /// Instance of MinifiedModule + set + { + this.parentModule=value; + + this.keyModified["parent_module"] = 1; + + } + } + + public Choice ActivityBadge + { + /// The method to get the activityBadge + /// Instance of Choice + get + { + return this.activityBadge; + + } + /// The method to set the value to activityBadge + /// Instance of Choice + set + { + this.activityBadge=value; + + this.keyModified["activity_badge"] = 1; + + } + } + + public List FieldStates + { + /// The method to get the fieldStates + /// Instance of List + get + { + return this.fieldStates; + + } + /// The method to set the value to fieldStates + /// Instance of List + set + { + this.fieldStates=value; + + this.keyModified["$field_states"] = 1; + + } + } + + public List BusinessCardFields + { + /// The method to get the businessCardFields + /// Instance of List + get + { + return this.businessCardFields; + + } + /// The method to set the value to businessCardFields + /// Instance of List + set + { + this.businessCardFields=value; + + this.keyModified["business_card_fields"] = 1; + + } + } + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public List Properties + { + /// The method to get the properties + /// Instance of List + get + { + return this.properties; + + } + /// The method to set the value to properties + /// Instance of List + set + { + this.properties=value; + + this.keyModified["$properties"] = 1; + + } + } + + public List OnDemandProperties + { + /// The method to get the onDemandProperties + /// Instance of List + get + { + return this.onDemandProperties; + + } + /// The method to set the value to onDemandProperties + /// Instance of List + set + { + this.onDemandProperties=value; + + this.keyModified["$on_demand_properties"] = 1; + + } + } + + public List SearchLayoutFields + { + /// The method to get the searchLayoutFields + /// Instance of List + get + { + return this.searchLayoutFields; + + } + /// The method to set the value to searchLayoutFields + /// Instance of List + set + { + this.searchLayoutFields=value; + + this.keyModified["search_layout_fields"] = 1; + + } + } + + public bool? KanbanViewSupported + { + /// The method to get the kanbanViewSupported + /// bool? representing the kanbanViewSupported + get + { + return this.kanbanViewSupported; + + } + /// The method to set the value to kanbanViewSupported + /// bool? + set + { + this.kanbanViewSupported=value; + + this.keyModified["kanban_view_supported"] = 1; + + } + } + + public LookupFieldProperties LookupFieldProperties + { + /// The method to get the lookupFieldProperties + /// Instance of LookupFieldProperties + get + { + return this.lookupFieldProperties; + + } + /// The method to set the value to lookupFieldProperties + /// Instance of LookupFieldProperties + set + { + this.lookupFieldProperties=value; + + this.keyModified["lookup_field_properties"] = 1; + + } + } + + public bool? KanbanView + { + /// The method to get the kanbanView + /// bool? representing the kanbanView + get + { + return this.kanbanView; + + } + /// The method to set the value to kanbanView + /// bool? + set + { + this.kanbanView=value; + + this.keyModified["kanban_view"] = 1; + + } + } + + public List RelatedLists + { + /// The method to get the relatedLists + /// Instance of List + get + { + return this.relatedLists; + + } + /// The method to set the value to relatedLists + /// Instance of List + set + { + this.relatedLists=value; + + this.keyModified["related_lists"] = 1; + + } + } + + public bool? FilterStatus + { + /// The method to get the filterStatus + /// bool? representing the filterStatus + get + { + return this.filterStatus; + + } + /// The method to set the value to filterStatus + /// bool? + set + { + this.filterStatus=value; + + this.keyModified["filter_status"] = 1; + + } + } + + public RelatedListProperties RelatedListProperties + { + /// The method to get the relatedListProperties + /// Instance of RelatedListProperties + get + { + return this.relatedListProperties; + + } + /// The method to set the value to relatedListProperties + /// Instance of RelatedListProperties + set + { + this.relatedListProperties=value; + + this.keyModified["related_list_properties"] = 1; + + } + } + + public string DisplayField + { + /// The method to get the displayField + /// string representing the displayField + get + { + return this.displayField; + + } + /// The method to set the value to displayField + /// string + set + { + this.displayField=value; + + this.keyModified["display_field"] = 1; + + } + } + + public List Layouts + { + /// The method to get the layouts + /// Instance of List + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of List + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public CustomViews.CustomViews CustomView + { + /// The method to get the customView + /// Instance of CustomViews + get + { + return this.customView; + + } + /// The method to set the value to customView + /// Instance of CustomViews + set + { + this.customView=value; + + this.keyModified["custom_view"] = 1; + + } + } + + public bool? ZiaView + { + /// The method to get the ziaView + /// bool? representing the ziaView + get + { + return this.ziaView; + + } + /// The method to set the value to ziaView + /// bool? + set + { + this.ziaView=value; + + this.keyModified["zia_view"] = 1; + + } + } + + public List DefaultMappingFields + { + /// The method to get the defaultMappingFields + /// Instance of List + get + { + return this.defaultMappingFields; + + } + /// The method to set the value to defaultMappingFields + /// Instance of List + set + { + this.defaultMappingFields=value; + + this.keyModified["default_mapping_fields"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public StaticSubformProperties StaticSubformProperties + { + /// The method to get the staticSubformProperties + /// Instance of StaticSubformProperties + get + { + return this.staticSubformProperties; + + } + /// The method to set the value to staticSubformProperties + /// Instance of StaticSubformProperties + set + { + this.staticSubformProperties=value; + + this.keyModified["static_subform_properties"] = 1; + + } + } + + public List LayoutAssociations + { + /// The method to get the layoutAssociations + /// Instance of List + get + { + return this.layoutAssociations; + + } + /// The method to set the value to layoutAssociations + /// Instance of List + set + { + this.layoutAssociations=value; + + this.keyModified["layout_associations"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModulesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModulesOperations.cs new file mode 100644 index 0000000..a0bc523 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ModulesOperations.cs @@ -0,0 +1,149 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; +using System; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class ModulesOperations + { + /// The method to get modules + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse GetModules(HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/modules"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get module by api name + /// string + /// Instance of APIResponse + public APIResponse GetModuleByAPIName(string apiName) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/modules/"); + + apiPath=string.Concat(apiPath, apiName.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update module by api name + /// string + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateModuleByAPIName(string apiName, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/modules/"); + + apiPath=string.Concat(apiPath, apiName.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get module + /// long? + /// Instance of APIResponse + public APIResponse GetModule(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/modules/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update module + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateModule(long? id, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/modules/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetModulesHeader + { + public static readonly Header IF_MODIFIED_SINCE=new Header("If-Modified-Since", "com.zoho.crm.api.Modules.GetModulesHeader"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/RelatedListProperties.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/RelatedListProperties.cs new file mode 100644 index 0000000..24d8121 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/RelatedListProperties.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Fields; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class RelatedListProperties : Model + { + private Fields.MinifiedField sortBy; + private List fields; + private string sortOrder; + private Dictionary keyModified=new Dictionary(); + + public Fields.MinifiedField SortBy + { + /// The method to get the sortBy + /// Instance of MinifiedField + get + { + return this.sortBy; + + } + /// The method to set the value to sortBy + /// Instance of MinifiedField + set + { + this.sortBy=value; + + this.keyModified["sort_by"] = 1; + + } + } + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public string SortOrder + { + /// The method to get the sortOrder + /// string representing the sortOrder + get + { + return this.sortOrder; + + } + /// The method to set the value to sortOrder + /// string + set + { + this.sortOrder=value; + + this.keyModified["sort_order"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ResponseHandler.cs new file mode 100644 index 0000000..a7cbbdc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Modules +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ResponseWrapper.cs new file mode 100644 index 0000000..ceecb00 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List modules; + private Dictionary keyModified=new Dictionary(); + + public List Modules + { + /// The method to get the modules + /// Instance of List + get + { + return this.modules; + + } + /// The method to set the value to modules + /// Instance of List + set + { + this.modules=value; + + this.keyModified["modules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/SharingProperties.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/SharingProperties.cs new file mode 100644 index 0000000..90fab46 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/SharingProperties.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class SharingProperties : Model + { + private string schedulerStatus; + private bool? sharePreferenceEnabled; + private Choice sharePermission; + private Dictionary keyModified=new Dictionary(); + + public string SchedulerStatus + { + /// The method to get the schedulerStatus + /// string representing the schedulerStatus + get + { + return this.schedulerStatus; + + } + /// The method to set the value to schedulerStatus + /// string + set + { + this.schedulerStatus=value; + + this.keyModified["scheduler_status"] = 1; + + } + } + + public bool? SharePreferenceEnabled + { + /// The method to get the sharePreferenceEnabled + /// bool? representing the sharePreferenceEnabled + get + { + return this.sharePreferenceEnabled; + + } + /// The method to set the value to sharePreferenceEnabled + /// bool? + set + { + this.sharePreferenceEnabled=value; + + this.keyModified["share_preference_enabled"] = 1; + + } + } + + public Choice SharePermission + { + /// The method to get the sharePermission + /// Instance of Choice + get + { + return this.sharePermission; + + } + /// The method to set the value to sharePermission + /// Instance of Choice + set + { + this.sharePermission=value; + + this.keyModified["share_permission"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/StaticSubformField.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/StaticSubformField.cs new file mode 100644 index 0000000..566bf8c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/StaticSubformField.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class StaticSubformField : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/StaticSubformProperties.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/StaticSubformProperties.cs new file mode 100644 index 0000000..703de39 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/StaticSubformProperties.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class StaticSubformProperties : Model + { + private List fields; + private Dictionary keyModified=new Dictionary(); + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/SuccessResponse.cs new file mode 100644 index 0000000..49093c9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Dictionary details; + private Choice message; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Territory.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Territory.cs new file mode 100644 index 0000000..347ebc6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Modules/Territory.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Modules +{ + + public class Territory : Model + { + private string name; + private long? id; + private bool? subordinates; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? Subordinates + { + /// The method to get the subordinates + /// bool? representing the subordinates + get + { + return this.subordinates; + + } + /// The method to set the value to subordinates + /// bool? + set + { + this.subordinates=value; + + this.keyModified["subordinates"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/APIException.cs new file mode 100644 index 0000000..b3ed858 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class APIException : Model, ResponseHandler, ActionHandler, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionHandler.cs new file mode 100644 index 0000000..49d783e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Notes +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionResponse.cs new file mode 100644 index 0000000..fbd17e8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Notes +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionWrapper.cs new file mode 100644 index 0000000..25376a1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class ActionWrapper : Model, ActionHandler + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/BodyWrapper.cs new file mode 100644 index 0000000..1e77344 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class BodyWrapper : Model + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/Info.cs new file mode 100644 index 0000000..e057d02 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/Info.cs @@ -0,0 +1,228 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class Info : Model + { + private int? perPage; + private string nextPageToken; + private int? count; + private string sortBy; + private int? page; + private string previousPageToken; + private DateTimeOffset? pageTokenExpiry; + private string sortOrder; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public string NextPageToken + { + /// The method to get the nextPageToken + /// string representing the nextPageToken + get + { + return this.nextPageToken; + + } + /// The method to set the value to nextPageToken + /// string + set + { + this.nextPageToken=value; + + this.keyModified["next_page_token"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public string SortBy + { + /// The method to get the sortBy + /// string representing the sortBy + get + { + return this.sortBy; + + } + /// The method to set the value to sortBy + /// string + set + { + this.sortBy=value; + + this.keyModified["sort_by"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public string PreviousPageToken + { + /// The method to get the previousPageToken + /// string representing the previousPageToken + get + { + return this.previousPageToken; + + } + /// The method to set the value to previousPageToken + /// string + set + { + this.previousPageToken=value; + + this.keyModified["previous_page_token"] = 1; + + } + } + + public DateTimeOffset? PageTokenExpiry + { + /// The method to get the pageTokenExpiry + /// DateTimeOffset? representing the pageTokenExpiry + get + { + return this.pageTokenExpiry; + + } + /// The method to set the value to pageTokenExpiry + /// DateTimeOffset? + set + { + this.pageTokenExpiry=value; + + this.keyModified["page_token_expiry"] = 1; + + } + } + + public string SortOrder + { + /// The method to get the sortOrder + /// string representing the sortOrder + get + { + return this.sortOrder; + + } + /// The method to set the value to sortOrder + /// string + set + { + this.sortOrder=value; + + this.keyModified["sort_order"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/Note.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/Note.cs new file mode 100644 index 0000000..15ae4c2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/Note.cs @@ -0,0 +1,377 @@ +using Com.Zoho.Crm.API.Attachments; +using Com.Zoho.Crm.API.Users; +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class Note : Model + { + private DateTimeOffset? modifiedTime; + private List attachments; + private Users.MinifiedUser owner; + private DateTimeOffset? createdTime; + private ParentId parentId; + private bool? editable; + private bool? isSharedToClient; + private string sharingPermission; + private Users.MinifiedUser modifiedBy; + private string size; + private string state; + private bool? voiceNote; + private long? id; + private Users.MinifiedUser createdBy; + private string noteTitle; + private string noteContent; + private Dictionary keyModified=new Dictionary(); + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["Modified_Time"] = 1; + + } + } + + public List Attachments + { + /// The method to get the attachments + /// Instance of List + get + { + return this.attachments; + + } + /// The method to set the value to attachments + /// Instance of List + set + { + this.attachments=value; + + this.keyModified["$attachments"] = 1; + + } + } + + public Users.MinifiedUser Owner + { + /// The method to get the owner + /// Instance of MinifiedUser + get + { + return this.owner; + + } + /// The method to set the value to owner + /// Instance of MinifiedUser + set + { + this.owner=value; + + this.keyModified["Owner"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["Created_Time"] = 1; + + } + } + + public ParentId ParentId + { + /// The method to get the parentId + /// Instance of ParentId + get + { + return this.parentId; + + } + /// The method to set the value to parentId + /// Instance of ParentId + set + { + this.parentId=value; + + this.keyModified["Parent_Id"] = 1; + + } + } + + public bool? Editable + { + /// The method to get the editable + /// bool? representing the editable + get + { + return this.editable; + + } + /// The method to set the value to editable + /// bool? + set + { + this.editable=value; + + this.keyModified["$editable"] = 1; + + } + } + + public bool? IsSharedToClient + { + /// The method to get the isSharedToClient + /// bool? representing the isSharedToClient + get + { + return this.isSharedToClient; + + } + /// The method to set the value to isSharedToClient + /// bool? + set + { + this.isSharedToClient=value; + + this.keyModified["$is_shared_to_client"] = 1; + + } + } + + public string SharingPermission + { + /// The method to get the sharingPermission + /// string representing the sharingPermission + get + { + return this.sharingPermission; + + } + /// The method to set the value to sharingPermission + /// string + set + { + this.sharingPermission=value; + + this.keyModified["$sharing_permission"] = 1; + + } + } + + public Users.MinifiedUser ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of MinifiedUser + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of MinifiedUser + set + { + this.modifiedBy=value; + + this.keyModified["Modified_By"] = 1; + + } + } + + public string Size + { + /// The method to get the size + /// string representing the size + get + { + return this.size; + + } + /// The method to set the value to size + /// string + set + { + this.size=value; + + this.keyModified["$size"] = 1; + + } + } + + public string State + { + /// The method to get the state + /// string representing the state + get + { + return this.state; + + } + /// The method to set the value to state + /// string + set + { + this.state=value; + + this.keyModified["$state"] = 1; + + } + } + + public bool? VoiceNote + { + /// The method to get the voiceNote + /// bool? representing the voiceNote + get + { + return this.voiceNote; + + } + /// The method to set the value to voiceNote + /// bool? + set + { + this.voiceNote=value; + + this.keyModified["$voice_note"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public Users.MinifiedUser CreatedBy + { + /// The method to get the createdBy + /// Instance of MinifiedUser + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of MinifiedUser + set + { + this.createdBy=value; + + this.keyModified["Created_By"] = 1; + + } + } + + public string NoteTitle + { + /// The method to get the noteTitle + /// string representing the noteTitle + get + { + return this.noteTitle; + + } + /// The method to set the value to noteTitle + /// string + set + { + this.noteTitle=value; + + this.keyModified["Note_Title"] = 1; + + } + } + + public string NoteContent + { + /// The method to get the noteContent + /// string representing the noteContent + get + { + return this.noteContent; + + } + /// The method to set the value to noteContent + /// string + set + { + this.noteContent=value; + + this.keyModified["Note_Content"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/NotesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/NotesOperations.cs new file mode 100644 index 0000000..4366cd0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/NotesOperations.cs @@ -0,0 +1,236 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; +using System; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class NotesOperations + { + /// The method to get notes + /// Instance of ParameterMap + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse GetNotes(ParameterMap paramInstance, HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Notes"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create notes + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateNotes(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Notes"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update notes + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateNotes(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Notes"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete notes + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse DeleteNotes(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Notes"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get note + /// long? + /// Instance of ParameterMap + /// Instance of HeaderMap + /// Instance of APIResponse + public APIResponse GetNote(long? id, ParameterMap paramInstance, HeaderMap headerInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Notes/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + handlerInstance.Header=headerInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update note + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateNote(long? id, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Notes/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete note + /// long? + /// Instance of APIResponse + public APIResponse DeleteNote(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/Notes/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetNotesParam + { + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.Notes.GetNotesParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.Notes.GetNotesParam"); + public static readonly Param FIELDS=new Param("fields", "com.zoho.crm.api.Notes.GetNotesParam"); + public static readonly Param SORT_ORDER=new Param("sort_order", "com.zoho.crm.api.Notes.GetNotesParam"); + public static readonly Param SORT_BY=new Param("sort_by", "com.zoho.crm.api.Notes.GetNotesParam"); + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.Notes.GetNotesParam"); + } + + + public static class GetNotesHeader + { + public static readonly Header IF_MODIFIED_SINCE=new Header("If-Modified-Since", "com.zoho.crm.api.Notes.GetNotesHeader"); + } + + + public static class DeleteNotesParam + { + public static readonly Param IDS=new Param("ids", "com.zoho.crm.api.Notes.DeleteNotesParam"); + } + + + public static class GetNoteParam + { + public static readonly Param FIELDS=new Param("fields", "com.zoho.crm.api.Notes.GetNoteParam"); + } + + + public static class GetNoteHeader + { + public static readonly Header IF_MODIFIED_SINCE=new Header("If-Modified-Since", "com.zoho.crm.api.Notes.GetNoteHeader"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ParentId.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ParentId.cs new file mode 100644 index 0000000..a73ed34 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ParentId.cs @@ -0,0 +1,102 @@ +using Com.Zoho.Crm.API.Modules; +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class ParentId : Model + { + private Modules.MinifiedModule module; + private long? id; + private string name; + private Dictionary keyModified=new Dictionary(); + + public Modules.MinifiedModule Module + { + /// The method to get the module + /// Instance of MinifiedModule + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of MinifiedModule + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ResponseHandler.cs new file mode 100644 index 0000000..38806e6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Notes +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ResponseWrapper.cs new file mode 100644 index 0000000..b07040d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List data; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/SuccessResponse.cs new file mode 100644 index 0000000..4b8312d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notes/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notes +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private Choice status; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/APIException.cs new file mode 100644 index 0000000..dd5f46d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class APIException : ActionResponse, Model, ResponseHandler, ActionHandler + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionHandler.cs new file mode 100644 index 0000000..f9e6f14 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Notifications +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionResponse.cs new file mode 100644 index 0000000..c508e96 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Notifications +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionWrapper.cs new file mode 100644 index 0000000..e125574 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class ActionWrapper : Model, ActionHandler + { + private List watch; + private Dictionary keyModified=new Dictionary(); + + public List Watch + { + /// The method to get the watch + /// Instance of List + get + { + return this.watch; + + } + /// The method to set the value to watch + /// Instance of List + set + { + this.watch=value; + + this.keyModified["watch"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/BodyWrapper.cs new file mode 100644 index 0000000..f11b8bc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class BodyWrapper : Model + { + private List watch; + private Dictionary keyModified=new Dictionary(); + + public List Watch + { + /// The method to get the watch + /// Instance of List + get + { + return this.watch; + + } + /// The method to set the value to watch + /// Instance of List + set + { + this.watch=value; + + this.keyModified["watch"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Criteria.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Criteria.cs new file mode 100644 index 0000000..0228895 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Criteria.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class Criteria : Model + { + private string comparator; + private Field field; + private object value; + private string groupOperator; + private List group; + private Dictionary keyModified=new Dictionary(); + + public string Comparator + { + /// The method to get the comparator + /// string representing the comparator + get + { + return this.comparator; + + } + /// The method to set the value to comparator + /// string + set + { + this.comparator=value; + + this.keyModified["comparator"] = 1; + + } + } + + public Field Field + { + /// The method to get the field + /// Instance of Field + get + { + return this.field; + + } + /// The method to set the value to field + /// Instance of Field + set + { + this.field=value; + + this.keyModified["field"] = 1; + + } + } + + public object Value + { + /// The method to get the value + /// object representing the value + get + { + return this.value; + + } + /// The method to set the value to value + /// object + set + { + this.value=value; + + this.keyModified["value"] = 1; + + } + } + + public string GroupOperator + { + /// The method to get the groupOperator + /// string representing the groupOperator + get + { + return this.groupOperator; + + } + /// The method to set the value to groupOperator + /// string + set + { + this.groupOperator=value; + + this.keyModified["group_operator"] = 1; + + } + } + + public List Group + { + /// The method to get the group + /// Instance of List + get + { + return this.group; + + } + /// The method to set the value to group + /// Instance of List + set + { + this.group=value; + + this.keyModified["group"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Event.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Event.cs new file mode 100644 index 0000000..2105a1c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Event.cs @@ -0,0 +1,165 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class Event : Model + { + private string resourceName; + private DateTimeOffset? channelExpiry; + private long? resourceId; + private string resourceUri; + private string channelId; + private List notificationCondition; + private Dictionary keyModified=new Dictionary(); + + public string ResourceName + { + /// The method to get the resourceName + /// string representing the resourceName + get + { + return this.resourceName; + + } + /// The method to set the value to resourceName + /// string + set + { + this.resourceName=value; + + this.keyModified["resource_name"] = 1; + + } + } + + public DateTimeOffset? ChannelExpiry + { + /// The method to get the channelExpiry + /// DateTimeOffset? representing the channelExpiry + get + { + return this.channelExpiry; + + } + /// The method to set the value to channelExpiry + /// DateTimeOffset? + set + { + this.channelExpiry=value; + + this.keyModified["channel_expiry"] = 1; + + } + } + + public long? ResourceId + { + /// The method to get the resourceId + /// long? representing the resourceId + get + { + return this.resourceId; + + } + /// The method to set the value to resourceId + /// long? + set + { + this.resourceId=value; + + this.keyModified["resource_id"] = 1; + + } + } + + public string ResourceUri + { + /// The method to get the resourceUri + /// string representing the resourceUri + get + { + return this.resourceUri; + + } + /// The method to set the value to resourceUri + /// string + set + { + this.resourceUri=value; + + this.keyModified["resource_uri"] = 1; + + } + } + + public string ChannelId + { + /// The method to get the channelId + /// string representing the channelId + get + { + return this.channelId; + + } + /// The method to set the value to channelId + /// string + set + { + this.channelId=value; + + this.keyModified["channel_id"] = 1; + + } + } + + public List NotificationCondition + { + /// The method to get the notificationCondition + /// Instance of List + get + { + return this.notificationCondition; + + } + /// The method to set the value to notificationCondition + /// Instance of List + set + { + this.notificationCondition=value; + + this.keyModified["notification_condition"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Field.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Field.cs new file mode 100644 index 0000000..1c7eb45 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Field.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class Field : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Info.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Info.cs new file mode 100644 index 0000000..9cddb81 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Info.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class Info : Model + { + private int? perPage; + private int? page; + private int? count; + private bool? moreRecords; + private Dictionary keyModified=new Dictionary(); + + public int? PerPage + { + /// The method to get the perPage + /// int? representing the perPage + get + { + return this.perPage; + + } + /// The method to set the value to perPage + /// int? + set + { + this.perPage=value; + + this.keyModified["per_page"] = 1; + + } + } + + public int? Page + { + /// The method to get the page + /// int? representing the page + get + { + return this.page; + + } + /// The method to set the value to page + /// int? + set + { + this.page=value; + + this.keyModified["page"] = 1; + + } + } + + public int? Count + { + /// The method to get the count + /// int? representing the count + get + { + return this.count; + + } + /// The method to set the value to count + /// int? + set + { + this.count=value; + + this.keyModified["count"] = 1; + + } + } + + public bool? MoreRecords + { + /// The method to get the moreRecords + /// bool? representing the moreRecords + get + { + return this.moreRecords; + + } + /// The method to set the value to moreRecords + /// bool? + set + { + this.moreRecords=value; + + this.keyModified["more_records"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Module.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Module.cs new file mode 100644 index 0000000..bf97add --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Module.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class Module : Model + { + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Notification.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Notification.cs new file mode 100644 index 0000000..0cfde35 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/Notification.cs @@ -0,0 +1,312 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class Notification : Event , Model + { + private string channelId; + private string notifyUrl; + private List events; + private string token; + private Dictionary fields; + private bool? notifyOnRelatedAction; + private bool? returnAffectedFieldValues; + private Choice deleteevents; + private string resourceName; + private DateTimeOffset? channelExpiry; + private long? resourceId; + private string resourceUri; + private List notificationCondition; + private Dictionary keyModified=new Dictionary(); + + public string ChannelId + { + /// The method to get the channelId + /// string representing the channelId + get + { + return this.channelId; + + } + /// The method to set the value to channelId + /// string + set + { + this.channelId=value; + + this.keyModified["channel_id"] = 1; + + } + } + + public string NotifyUrl + { + /// The method to get the notifyUrl + /// string representing the notifyUrl + get + { + return this.notifyUrl; + + } + /// The method to set the value to notifyUrl + /// string + set + { + this.notifyUrl=value; + + this.keyModified["notify_url"] = 1; + + } + } + + public List Events + { + /// The method to get the events + /// Instance of List + get + { + return this.events; + + } + /// The method to set the value to events + /// Instance of List + set + { + this.events=value; + + this.keyModified["events"] = 1; + + } + } + + public string Token + { + /// The method to get the token + /// string representing the token + get + { + return this.token; + + } + /// The method to set the value to token + /// string + set + { + this.token=value; + + this.keyModified["token"] = 1; + + } + } + + public Dictionary Fields + { + /// The method to get the fields + /// Dictionary representing the fields + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Dictionary + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public bool? NotifyOnRelatedAction + { + /// The method to get the notifyOnRelatedAction + /// bool? representing the notifyOnRelatedAction + get + { + return this.notifyOnRelatedAction; + + } + /// The method to set the value to notifyOnRelatedAction + /// bool? + set + { + this.notifyOnRelatedAction=value; + + this.keyModified["notify_on_related_action"] = 1; + + } + } + + public bool? ReturnAffectedFieldValues + { + /// The method to get the returnAffectedFieldValues + /// bool? representing the returnAffectedFieldValues + get + { + return this.returnAffectedFieldValues; + + } + /// The method to set the value to returnAffectedFieldValues + /// bool? + set + { + this.returnAffectedFieldValues=value; + + this.keyModified["return_affected_field_values"] = 1; + + } + } + + public Choice Deleteevents + { + /// The method to get the deleteevents + /// Instance of Choice + get + { + return this.deleteevents; + + } + /// The method to set the value to deleteevents + /// Instance of Choice + set + { + this.deleteevents=value; + + this.keyModified["_delete_events"] = 1; + + } + } + + public string ResourceName + { + /// The method to get the resourceName + /// string representing the resourceName + get + { + return this.resourceName; + + } + /// The method to set the value to resourceName + /// string + set + { + this.resourceName=value; + + this.keyModified["resource_name"] = 1; + + } + } + + public DateTimeOffset? ChannelExpiry + { + /// The method to get the channelExpiry + /// DateTimeOffset? representing the channelExpiry + get + { + return this.channelExpiry; + + } + /// The method to set the value to channelExpiry + /// DateTimeOffset? + set + { + this.channelExpiry=value; + + this.keyModified["channel_expiry"] = 1; + + } + } + + public long? ResourceId + { + /// The method to get the resourceId + /// long? representing the resourceId + get + { + return this.resourceId; + + } + /// The method to set the value to resourceId + /// long? + set + { + this.resourceId=value; + + this.keyModified["resource_id"] = 1; + + } + } + + public string ResourceUri + { + /// The method to get the resourceUri + /// string representing the resourceUri + get + { + return this.resourceUri; + + } + /// The method to set the value to resourceUri + /// string + set + { + this.resourceUri=value; + + this.keyModified["resource_uri"] = 1; + + } + } + + public List NotificationCondition + { + /// The method to get the notificationCondition + /// Instance of List + get + { + return this.notificationCondition; + + } + /// The method to set the value to notificationCondition + /// Instance of List + set + { + this.notificationCondition=value; + + this.keyModified["notification_condition"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/NotificationCondition.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/NotificationCondition.cs new file mode 100644 index 0000000..d684452 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/NotificationCondition.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class NotificationCondition : Model + { + private string type; + private Module module; + private Criteria fieldSelection; + private Dictionary keyModified=new Dictionary(); + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public Module Module + { + /// The method to get the module + /// Instance of Module + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Module + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + public Criteria FieldSelection + { + /// The method to get the fieldSelection + /// Instance of Criteria + get + { + return this.fieldSelection; + + } + /// The method to set the value to fieldSelection + /// Instance of Criteria + set + { + this.fieldSelection=value; + + this.keyModified["field_selection"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/NotificationsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/NotificationsOperations.cs new file mode 100644 index 0000000..4a95232 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/NotificationsOperations.cs @@ -0,0 +1,183 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class NotificationsOperations + { + /// The method to get notifications + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetNotifications(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/actions/watch"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to enable notifications + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse EnableNotifications(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/actions/watch"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update notifications + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateNotifications(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/actions/watch"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update notification + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateNotification(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/actions/watch"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PATCH; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to disable notification + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse DisableNotification(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/actions/watch"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PATCH; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete notification + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse DeleteNotification(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/actions/watch"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetNotificationsParam + { + public static readonly Param PAGE=new Param("page", "com.zoho.crm.api.Notifications.GetNotificationsParam"); + public static readonly Param PER_PAGE=new Param("per_page", "com.zoho.crm.api.Notifications.GetNotificationsParam"); + public static readonly Param CHANNEL_ID=new Param("channel_id", "com.zoho.crm.api.Notifications.GetNotificationsParam"); + public static readonly Param MODULE=new Param("module", "com.zoho.crm.api.Notifications.GetNotificationsParam"); + } + + + public static class DeleteNotificationParam + { + public static readonly Param CHANNEL_IDS=new Param("channel_ids", "com.zoho.crm.api.Notifications.DeleteNotificationParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ResponseHandler.cs new file mode 100644 index 0000000..9cbaf09 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Notifications +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ResponseWrapper.cs new file mode 100644 index 0000000..98e6148 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/ResponseWrapper.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List watch; + private Info info; + private Dictionary keyModified=new Dictionary(); + + public List Watch + { + /// The method to get the watch + /// Instance of List + get + { + return this.watch; + + } + /// The method to set the value to watch + /// Instance of List + set + { + this.watch=value; + + this.keyModified["watch"] = 1; + + } + } + + public Info Info + { + /// The method to get the info + /// Instance of Info + get + { + return this.info; + + } + /// The method to set the value to info + /// Instance of Info + set + { + this.info=value; + + this.keyModified["info"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/SuccessResponse.cs new file mode 100644 index 0000000..3125b2d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Notifications/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Notifications +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/APIException.cs new file mode 100644 index 0000000..e090831 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/APIException.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class APIException : Model, ResponseHandler, ActionHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + private string apiName; + private string jsonPath; + private List features; + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + public List Features + { + /// The method to get the features + /// Instance of List + get + { + return this.features; + + } + /// The method to set the value to features + /// Instance of List + set + { + this.features=value; + + this.keyModified["features"] = 1; + + } + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ActionHandler.cs new file mode 100644 index 0000000..77e54f3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Org +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ActionWrapper.cs new file mode 100644 index 0000000..b989b38 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class ActionWrapper : Model + { + private List org; + private Dictionary keyModified=new Dictionary(); + + public List Org + { + /// The method to get the org + /// Instance of List + get + { + return this.org; + + } + /// The method to set the value to org + /// Instance of List + set + { + this.org=value; + + this.keyModified["org"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/CheckinPreferences.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/CheckinPreferences.cs new file mode 100644 index 0000000..97dfe5a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/CheckinPreferences.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class CheckinPreferences : Model + { + private string restrictedEventTypes; + private Dictionary keyModified=new Dictionary(); + + public string RestrictedEventTypes + { + /// The method to get the restrictedEventTypes + /// string representing the restrictedEventTypes + get + { + return this.restrictedEventTypes; + + } + /// The method to set the value to restrictedEventTypes + /// string + set + { + this.restrictedEventTypes=value; + + this.keyModified["restricted_event_types"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Feature.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Feature.cs new file mode 100644 index 0000000..ca0d5a2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Feature.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class Feature : Model + { + private string name; + private List resources; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public List Resources + { + /// The method to get the resources + /// Instance of List + get + { + return this.resources; + + } + /// The method to set the value to resources + /// Instance of List + set + { + this.resources=value; + + this.keyModified["resources"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/FileBodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/FileBodyWrapper.cs new file mode 100644 index 0000000..a233afa --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/FileBodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class FileBodyWrapper : Model, ResponseHandler + { + private StreamWrapper file; + private Dictionary keyModified=new Dictionary(); + + public StreamWrapper File + { + /// The method to get the file + /// Instance of StreamWrapper + get + { + return this.file; + + } + /// The method to set the value to file + /// Instance of StreamWrapper + set + { + this.file=value; + + this.keyModified["file"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/HierarchyPreferences.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/HierarchyPreferences.cs new file mode 100644 index 0000000..286efa1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/HierarchyPreferences.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class HierarchyPreferences : Model + { + private Choice type; + private bool? strictlyReporting; + private Dictionary keyModified=new Dictionary(); + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public bool? StrictlyReporting + { + /// The method to get the strictlyReporting + /// bool? representing the strictlyReporting + get + { + return this.strictlyReporting; + + } + /// The method to set the value to strictlyReporting + /// bool? + set + { + this.strictlyReporting=value; + + this.keyModified["strictly_reporting"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/LicenseDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/LicenseDetails.cs new file mode 100644 index 0000000..572dfbd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/LicenseDetails.cs @@ -0,0 +1,186 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class LicenseDetails : Model + { + private DateTimeOffset? paidExpiry; + private int? usersLicensePurchased; + private string trialType; + private string trialExpiry; + private bool? paid; + private string paidType; + private string trialAction; + private Dictionary keyModified=new Dictionary(); + + public DateTimeOffset? PaidExpiry + { + /// The method to get the paidExpiry + /// DateTimeOffset? representing the paidExpiry + get + { + return this.paidExpiry; + + } + /// The method to set the value to paidExpiry + /// DateTimeOffset? + set + { + this.paidExpiry=value; + + this.keyModified["paid_expiry"] = 1; + + } + } + + public int? UsersLicensePurchased + { + /// The method to get the usersLicensePurchased + /// int? representing the usersLicensePurchased + get + { + return this.usersLicensePurchased; + + } + /// The method to set the value to usersLicensePurchased + /// int? + set + { + this.usersLicensePurchased=value; + + this.keyModified["users_license_purchased"] = 1; + + } + } + + public string TrialType + { + /// The method to get the trialType + /// string representing the trialType + get + { + return this.trialType; + + } + /// The method to set the value to trialType + /// string + set + { + this.trialType=value; + + this.keyModified["trial_type"] = 1; + + } + } + + public string TrialExpiry + { + /// The method to get the trialExpiry + /// string representing the trialExpiry + get + { + return this.trialExpiry; + + } + /// The method to set the value to trialExpiry + /// string + set + { + this.trialExpiry=value; + + this.keyModified["trial_expiry"] = 1; + + } + } + + public bool? Paid + { + /// The method to get the paid + /// bool? representing the paid + get + { + return this.paid; + + } + /// The method to set the value to paid + /// bool? + set + { + this.paid=value; + + this.keyModified["paid"] = 1; + + } + } + + public string PaidType + { + /// The method to get the paidType + /// string representing the paidType + get + { + return this.paidType; + + } + /// The method to set the value to paidType + /// string + set + { + this.paidType=value; + + this.keyModified["paid_type"] = 1; + + } + } + + public string TrialAction + { + /// The method to get the trialAction + /// string representing the trialAction + get + { + return this.trialAction; + + } + /// The method to set the value to trialAction + /// string + set + { + this.trialAction=value; + + this.keyModified["trial_action"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Org.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Org.cs new file mode 100644 index 0000000..912e75d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Org.cs @@ -0,0 +1,942 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class Org : Model + { + private string country; + private string photoId; + private string city; + private string description; + private bool? mcStatus; + private bool? gappsEnabled; + private bool? translationEnabled; + private string street; + private string domainName; + private string alias; + private string currency; + private string id; + private string state; + private string fax; + private string zip; + private string employeeCount; + private string website; + private string currencySymbol; + private string mobile; + private string currencyLocale; + private string primaryZuid; + private string ziaPortalId; + private string timeZone; + private string zgid; + private string countryCode; + private bool? deletableOrgAccount; + private LicenseDetails licenseDetails; + private HierarchyPreferences hierarchyPreferences; + private string phone; + private string companyName; + private bool? privacySettings; + private string primaryEmail; + private string isoCode; + private bool? hipaaComplianceEnabled; + private bool? liteUsersEnabled; + private int? maxPerPage; + private string ezgid; + private string callIcon; + private bool? oauthPresence; + private int? ziaZgid; + private CheckinPreferences checkinPreferences; + private Choice type; + private DateTimeOffset? createdTime; + private Dictionary keyModified=new Dictionary(); + + public string Country + { + /// The method to get the country + /// string representing the country + get + { + return this.country; + + } + /// The method to set the value to country + /// string + set + { + this.country=value; + + this.keyModified["country"] = 1; + + } + } + + public string PhotoId + { + /// The method to get the photoId + /// string representing the photoId + get + { + return this.photoId; + + } + /// The method to set the value to photoId + /// string + set + { + this.photoId=value; + + this.keyModified["photo_id"] = 1; + + } + } + + public string City + { + /// The method to get the city + /// string representing the city + get + { + return this.city; + + } + /// The method to set the value to city + /// string + set + { + this.city=value; + + this.keyModified["city"] = 1; + + } + } + + public string Description + { + /// The method to get the description + /// string representing the description + get + { + return this.description; + + } + /// The method to set the value to description + /// string + set + { + this.description=value; + + this.keyModified["description"] = 1; + + } + } + + public bool? McStatus + { + /// The method to get the mcStatus + /// bool? representing the mcStatus + get + { + return this.mcStatus; + + } + /// The method to set the value to mcStatus + /// bool? + set + { + this.mcStatus=value; + + this.keyModified["mc_status"] = 1; + + } + } + + public bool? GappsEnabled + { + /// The method to get the gappsEnabled + /// bool? representing the gappsEnabled + get + { + return this.gappsEnabled; + + } + /// The method to set the value to gappsEnabled + /// bool? + set + { + this.gappsEnabled=value; + + this.keyModified["gapps_enabled"] = 1; + + } + } + + public bool? TranslationEnabled + { + /// The method to get the translationEnabled + /// bool? representing the translationEnabled + get + { + return this.translationEnabled; + + } + /// The method to set the value to translationEnabled + /// bool? + set + { + this.translationEnabled=value; + + this.keyModified["translation_enabled"] = 1; + + } + } + + public string Street + { + /// The method to get the street + /// string representing the street + get + { + return this.street; + + } + /// The method to set the value to street + /// string + set + { + this.street=value; + + this.keyModified["street"] = 1; + + } + } + + public string DomainName + { + /// The method to get the domainName + /// string representing the domainName + get + { + return this.domainName; + + } + /// The method to set the value to domainName + /// string + set + { + this.domainName=value; + + this.keyModified["domain_name"] = 1; + + } + } + + public string Alias + { + /// The method to get the alias + /// string representing the alias + get + { + return this.alias; + + } + /// The method to set the value to alias + /// string + set + { + this.alias=value; + + this.keyModified["alias"] = 1; + + } + } + + public string Currency + { + /// The method to get the currency + /// string representing the currency + get + { + return this.currency; + + } + /// The method to set the value to currency + /// string + set + { + this.currency=value; + + this.keyModified["currency"] = 1; + + } + } + + public string Id + { + /// The method to get the id + /// string representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// string + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string State + { + /// The method to get the state + /// string representing the state + get + { + return this.state; + + } + /// The method to set the value to state + /// string + set + { + this.state=value; + + this.keyModified["state"] = 1; + + } + } + + public string Fax + { + /// The method to get the fax + /// string representing the fax + get + { + return this.fax; + + } + /// The method to set the value to fax + /// string + set + { + this.fax=value; + + this.keyModified["fax"] = 1; + + } + } + + public string Zip + { + /// The method to get the zip + /// string representing the zip + get + { + return this.zip; + + } + /// The method to set the value to zip + /// string + set + { + this.zip=value; + + this.keyModified["zip"] = 1; + + } + } + + public string EmployeeCount + { + /// The method to get the employeeCount + /// string representing the employeeCount + get + { + return this.employeeCount; + + } + /// The method to set the value to employeeCount + /// string + set + { + this.employeeCount=value; + + this.keyModified["employee_count"] = 1; + + } + } + + public string Website + { + /// The method to get the website + /// string representing the website + get + { + return this.website; + + } + /// The method to set the value to website + /// string + set + { + this.website=value; + + this.keyModified["website"] = 1; + + } + } + + public string CurrencySymbol + { + /// The method to get the currencySymbol + /// string representing the currencySymbol + get + { + return this.currencySymbol; + + } + /// The method to set the value to currencySymbol + /// string + set + { + this.currencySymbol=value; + + this.keyModified["currency_symbol"] = 1; + + } + } + + public string Mobile + { + /// The method to get the mobile + /// string representing the mobile + get + { + return this.mobile; + + } + /// The method to set the value to mobile + /// string + set + { + this.mobile=value; + + this.keyModified["mobile"] = 1; + + } + } + + public string CurrencyLocale + { + /// The method to get the currencyLocale + /// string representing the currencyLocale + get + { + return this.currencyLocale; + + } + /// The method to set the value to currencyLocale + /// string + set + { + this.currencyLocale=value; + + this.keyModified["currency_locale"] = 1; + + } + } + + public string PrimaryZuid + { + /// The method to get the primaryZuid + /// string representing the primaryZuid + get + { + return this.primaryZuid; + + } + /// The method to set the value to primaryZuid + /// string + set + { + this.primaryZuid=value; + + this.keyModified["primary_zuid"] = 1; + + } + } + + public string ZiaPortalId + { + /// The method to get the ziaPortalId + /// string representing the ziaPortalId + get + { + return this.ziaPortalId; + + } + /// The method to set the value to ziaPortalId + /// string + set + { + this.ziaPortalId=value; + + this.keyModified["zia_portal_id"] = 1; + + } + } + + public string TimeZone + { + /// The method to get the timeZone + /// string representing the timeZone + get + { + return this.timeZone; + + } + /// The method to set the value to timeZone + /// string + set + { + this.timeZone=value; + + this.keyModified["time_zone"] = 1; + + } + } + + public string Zgid + { + /// The method to get the zgid + /// string representing the zgid + get + { + return this.zgid; + + } + /// The method to set the value to zgid + /// string + set + { + this.zgid=value; + + this.keyModified["zgid"] = 1; + + } + } + + public string CountryCode + { + /// The method to get the countryCode + /// string representing the countryCode + get + { + return this.countryCode; + + } + /// The method to set the value to countryCode + /// string + set + { + this.countryCode=value; + + this.keyModified["country_code"] = 1; + + } + } + + public bool? DeletableOrgAccount + { + /// The method to get the deletableOrgAccount + /// bool? representing the deletableOrgAccount + get + { + return this.deletableOrgAccount; + + } + /// The method to set the value to deletableOrgAccount + /// bool? + set + { + this.deletableOrgAccount=value; + + this.keyModified["deletable_org_account"] = 1; + + } + } + + public LicenseDetails LicenseDetails + { + /// The method to get the licenseDetails + /// Instance of LicenseDetails + get + { + return this.licenseDetails; + + } + /// The method to set the value to licenseDetails + /// Instance of LicenseDetails + set + { + this.licenseDetails=value; + + this.keyModified["license_details"] = 1; + + } + } + + public HierarchyPreferences HierarchyPreferences + { + /// The method to get the hierarchyPreferences + /// Instance of HierarchyPreferences + get + { + return this.hierarchyPreferences; + + } + /// The method to set the value to hierarchyPreferences + /// Instance of HierarchyPreferences + set + { + this.hierarchyPreferences=value; + + this.keyModified["hierarchy_preferences"] = 1; + + } + } + + public string Phone + { + /// The method to get the phone + /// string representing the phone + get + { + return this.phone; + + } + /// The method to set the value to phone + /// string + set + { + this.phone=value; + + this.keyModified["phone"] = 1; + + } + } + + public string CompanyName + { + /// The method to get the companyName + /// string representing the companyName + get + { + return this.companyName; + + } + /// The method to set the value to companyName + /// string + set + { + this.companyName=value; + + this.keyModified["company_name"] = 1; + + } + } + + public bool? PrivacySettings + { + /// The method to get the privacySettings + /// bool? representing the privacySettings + get + { + return this.privacySettings; + + } + /// The method to set the value to privacySettings + /// bool? + set + { + this.privacySettings=value; + + this.keyModified["privacy_settings"] = 1; + + } + } + + public string PrimaryEmail + { + /// The method to get the primaryEmail + /// string representing the primaryEmail + get + { + return this.primaryEmail; + + } + /// The method to set the value to primaryEmail + /// string + set + { + this.primaryEmail=value; + + this.keyModified["primary_email"] = 1; + + } + } + + public string IsoCode + { + /// The method to get the isoCode + /// string representing the isoCode + get + { + return this.isoCode; + + } + /// The method to set the value to isoCode + /// string + set + { + this.isoCode=value; + + this.keyModified["iso_code"] = 1; + + } + } + + public bool? HipaaComplianceEnabled + { + /// The method to get the hipaaComplianceEnabled + /// bool? representing the hipaaComplianceEnabled + get + { + return this.hipaaComplianceEnabled; + + } + /// The method to set the value to hipaaComplianceEnabled + /// bool? + set + { + this.hipaaComplianceEnabled=value; + + this.keyModified["hipaa_compliance_enabled"] = 1; + + } + } + + public bool? LiteUsersEnabled + { + /// The method to get the liteUsersEnabled + /// bool? representing the liteUsersEnabled + get + { + return this.liteUsersEnabled; + + } + /// The method to set the value to liteUsersEnabled + /// bool? + set + { + this.liteUsersEnabled=value; + + this.keyModified["lite_users_enabled"] = 1; + + } + } + + public int? MaxPerPage + { + /// The method to get the maxPerPage + /// int? representing the maxPerPage + get + { + return this.maxPerPage; + + } + /// The method to set the value to maxPerPage + /// int? + set + { + this.maxPerPage=value; + + this.keyModified["max_per_page"] = 1; + + } + } + + public string Ezgid + { + /// The method to get the ezgid + /// string representing the ezgid + get + { + return this.ezgid; + + } + /// The method to set the value to ezgid + /// string + set + { + this.ezgid=value; + + this.keyModified["ezgid"] = 1; + + } + } + + public string CallIcon + { + /// The method to get the callIcon + /// string representing the callIcon + get + { + return this.callIcon; + + } + /// The method to set the value to callIcon + /// string + set + { + this.callIcon=value; + + this.keyModified["call_icon"] = 1; + + } + } + + public bool? OauthPresence + { + /// The method to get the oauthPresence + /// bool? representing the oauthPresence + get + { + return this.oauthPresence; + + } + /// The method to set the value to oauthPresence + /// bool? + set + { + this.oauthPresence=value; + + this.keyModified["oauth_presence"] = 1; + + } + } + + public int? ZiaZgid + { + /// The method to get the ziaZgid + /// int? representing the ziaZgid + get + { + return this.ziaZgid; + + } + /// The method to set the value to ziaZgid + /// int? + set + { + this.ziaZgid=value; + + this.keyModified["zia_zgid"] = 1; + + } + } + + public CheckinPreferences CheckinPreferences + { + /// The method to get the checkinPreferences + /// Instance of CheckinPreferences + get + { + return this.checkinPreferences; + + } + /// The method to set the value to checkinPreferences + /// Instance of CheckinPreferences + set + { + this.checkinPreferences=value; + + this.keyModified["checkin_preferences"] = 1; + + } + } + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/OrgOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/OrgOperations.cs new file mode 100644 index 0000000..84f8820 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/OrgOperations.cs @@ -0,0 +1,105 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Org +{ + + public class OrgOperations + { + /// The method to get organization + /// Instance of APIResponse + public APIResponse GetOrganization() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to get org photo + /// Instance of APIResponse + public APIResponse GetOrgPhoto() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/photo"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "image/png"); + + + } + + /// The method to upload organization photo + /// Instance of FileBodyWrapper + /// Instance of APIResponse + public APIResponse UploadOrganizationPhoto(FileBodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/photo"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="multipart/form-data"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete organization photo + /// Instance of APIResponse + public APIResponse DeleteOrganizationPhoto() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/org/photo"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetOrganizationHeader + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Resource.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Resource.cs new file mode 100644 index 0000000..608f942 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/Resource.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class Resource : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ResponseHandler.cs new file mode 100644 index 0000000..f961b7c --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Org +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ResponseWrapper.cs new file mode 100644 index 0000000..4b0db1f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List org; + private Dictionary keyModified=new Dictionary(); + + public List Org + { + /// The method to get the org + /// Instance of List + get + { + return this.org; + + } + /// The method to set the value to org + /// Instance of List + set + { + this.org=value; + + this.keyModified["org"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/SuccessResponse.cs new file mode 100644 index 0000000..bc20f16 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Org/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Org +{ + + public class SuccessResponse : Model, ActionHandler + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Param.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Param.cs new file mode 100644 index 0000000..d5330f8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Param.cs @@ -0,0 +1,47 @@ +namespace Com.Zoho.Crm.API +{ + /// + /// This class representing the HTTP parameter. + /// + /// A CSharp DataType + public class Param + { + string name; + string className; + + /// + /// Creates an Param class instance with the specified parameter name. + /// + /// A string containing the parameter name. + /// A string containing the parameter class name. + public Param(string name, string className) + { + this.name = name; + this.className = className; + } + + /// + /// This is a getter method to get parameter name. + /// + /// A string representing the parameter name + public string Name + { + get + { + return name; + } + } + + /// + /// This is a getter method to get parameter class name. + /// + /// A string representing the parameter class name. + public string ClassName + { + get + { + return this.className; + } + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ParameterMap.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ParameterMap.cs new file mode 100644 index 0000000..dce9424 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/ParameterMap.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using Com.Zoho.API.Exception; +using Com.Zoho.Crm.API.Logger; +using Com.Zoho.Crm.API.Util; +using Newtonsoft.Json; + +namespace Com.Zoho.Crm.API +{ + /// + /// This class representing the HTTP parameter name and value. + /// + public class ParameterMap + { + private Dictionary parameterMap = new Dictionary(); + + /// + /// This is a getter method to get parameter map. + /// + /// A Dictionary<string, string> representing the API response parameters. + public Dictionary ParameterMaps + { + get + { + return parameterMap; + } + } + + /// + /// This method to add parameter name and value. + /// + /// A T containing the specified data type. + /// A Param<T> class instance. + /// A T containing the parameter value. + public void Add(Param param, T value) + { + if(param == null) + { + throw new SDKException(Constants.PARAMETER_NULL_ERROR, Constants.PARAM_INSTANCE_NULL_ERROR); + } + string paramName = param.Name; + if(paramName == null) + { + throw new SDKException(Constants.PARAM_NAME_NULL_ERROR, Constants.PARAM_NAME_NULL_ERROR_MESSAGE); + } + if(value == null) + { + throw new SDKException(Constants.PARAMETER_NULL_ERROR, paramName + Constants.NULL_VALUE_ERROR_MESSAGE); + } + try + { + string paramClassName = param.ClassName; + string parsedParamValue; + if (paramClassName != null) + { + HeaderParamValidator headerParamValidator = new HeaderParamValidator(); + parsedParamValue = headerParamValidator.Validate(paramName, paramClassName, value); + } + else + { + try + { + string type = value.GetType().FullName; + Type dataTypeConverter = Type.GetType(Constants.DATATYPECONVERTER.Replace(Constants._TYPE, type)); + MethodInfo method = dataTypeConverter.GetMethod(Constants.POST_CONVERT); + parsedParamValue = Convert.ToString(method.Invoke(null, new object[] { value, type })); + if (value is bool) + { + parsedParamValue = parsedParamValue.ToLower(); + } + } + catch (Exception) + { + parsedParamValue = value.ToString(); + } + } + if (ParameterMaps.ContainsKey(paramName) && !string.IsNullOrEmpty(ParameterMaps[paramName])) + { + string existingParamValue = ParameterMaps[paramName]; + existingParamValue = existingParamValue + "," + parsedParamValue.ToString(); + ParameterMaps[paramName] = existingParamValue; + } + else + { + ParameterMaps[paramName] = parsedParamValue.ToString(); + } + } + catch (SDKException e) + { + SDKLogger.LogError(Constants.PARAM_EXCEPTION + JsonConvert.SerializeObject(e)); + throw e; + } + catch (Exception e) + { + SDKException exception = new SDKException(e); + SDKLogger.LogError(Constants.PARAM_EXCEPTION + JsonConvert.SerializeObject(exception)); + throw exception; + } + } + } +} diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/APIException.cs new file mode 100644 index 0000000..dea507b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PickListValues +{ + + public class APIException : Model, ResponseHandler + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/LayoutAssociation.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/LayoutAssociation.cs new file mode 100644 index 0000000..9b32978 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/LayoutAssociation.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PickListValues +{ + + public class LayoutAssociation : Model + { + private string apiName; + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/PickListValues.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/PickListValues.cs new file mode 100644 index 0000000..03df4c9 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/PickListValues.cs @@ -0,0 +1,206 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PickListValues +{ + + public class PickListValues : Model + { + private int? sequenceNumber; + private string displayValue; + private string referenceValue; + private string colourCode; + private string actualValue; + private long? id; + private string type; + private List layoutAssociations; + private Dictionary keyModified=new Dictionary(); + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public string ReferenceValue + { + /// The method to get the referenceValue + /// string representing the referenceValue + get + { + return this.referenceValue; + + } + /// The method to set the value to referenceValue + /// string + set + { + this.referenceValue=value; + + this.keyModified["reference_value"] = 1; + + } + } + + public string ColourCode + { + /// The method to get the colourCode + /// string representing the colourCode + get + { + return this.colourCode; + + } + /// The method to set the value to colourCode + /// string + set + { + this.colourCode=value; + + this.keyModified["colour_code"] = 1; + + } + } + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public List LayoutAssociations + { + /// The method to get the layoutAssociations + /// Instance of List + get + { + return this.layoutAssociations; + + } + /// The method to set the value to layoutAssociations + /// Instance of List + set + { + this.layoutAssociations=value; + + this.keyModified["layout_associations"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/PickListValuesOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/PickListValuesOperations.cs new file mode 100644 index 0000000..3da145d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/PickListValuesOperations.cs @@ -0,0 +1,58 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.PickListValues +{ + + public class PickListValuesOperations + { + private long? fieldId; + private string module; + + /// /// Creates an instance of PickListValuesOperations with the given parameters + /// long? + /// string + + public PickListValuesOperations(long? fieldId, string module) + { + this.fieldId=fieldId; + + this.module=module; + + + } + + /// The method to get pick list values + /// Instance of APIResponse + public APIResponse GetPickListValues() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/fields/"); + + apiPath=string.Concat(apiPath, this.fieldId.ToString()); + + apiPath=string.Concat(apiPath, "/pick_list_values"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("module", "com.zoho.crm.api.PickListValues.GetPickListValuesParam"), this.module); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + + public static class GetPickListValuesParam + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/ResponseHandler.cs new file mode 100644 index 0000000..b65b660 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.PickListValues +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/ResponseWrapper.cs new file mode 100644 index 0000000..c74b646 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PickListValues/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PickListValues +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List pickListValues; + private Dictionary keyModified=new Dictionary(); + + public List PickListValues + { + /// The method to get the pickListValues + /// Instance of List + get + { + return this.pickListValues; + + } + /// The method to set the value to pickListValues + /// Instance of List + set + { + this.pickListValues=value; + + this.keyModified["pick_list_values"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/APIException.cs new file mode 100644 index 0000000..15c0e20 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class APIException : Model, ActionResponse, TransferPipelineActionResponse, ResponseHandler, ActionHandler, TransferPipelineActionHandler + { + private Choice status; + private Choice code; + private Choice message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public Choice Message + { + /// The method to get the message + /// Instance of Choice + get + { + return this.message; + + } + /// The method to set the value to message + /// Instance of Choice + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionHandler.cs new file mode 100644 index 0000000..6f58cee --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Pipeline +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionResponse.cs new file mode 100644 index 0000000..6029f39 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Pipeline +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionWrapper.cs new file mode 100644 index 0000000..d061820 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class ActionWrapper : Model, ActionHandler + { + private List pipeline; + private Dictionary keyModified=new Dictionary(); + + public List Pipeline + { + /// The method to get the pipeline + /// Instance of List + get + { + return this.pipeline; + + } + /// The method to set the value to pipeline + /// Instance of List + set + { + this.pipeline=value; + + this.keyModified["pipeline"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/BodyWrapper.cs new file mode 100644 index 0000000..1e52a7f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class BodyWrapper : Model + { + private List pipeline; + private Dictionary keyModified=new Dictionary(); + + public List Pipeline + { + /// The method to get the pipeline + /// Instance of List + get + { + return this.pipeline; + + } + /// The method to set the value to pipeline + /// Instance of List + set + { + this.pipeline=value; + + this.keyModified["pipeline"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/DPipeline.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/DPipeline.cs new file mode 100644 index 0000000..33a8103 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/DPipeline.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class DPipeline : Model + { + private Delete delete; + private Dictionary keyModified=new Dictionary(); + + public Delete Delete + { + /// The method to get the delete + /// Instance of Delete + get + { + return this.delete; + + } + /// The method to set the value to delete + /// Instance of Delete + set + { + this.delete=value; + + this.keyModified["_delete"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/DPipelineWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/DPipelineWrapper.cs new file mode 100644 index 0000000..71cec45 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/DPipelineWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class DPipelineWrapper : Model + { + private List pipeline; + private Dictionary keyModified=new Dictionary(); + + public List Pipeline + { + /// The method to get the pipeline + /// Instance of List + get + { + return this.pipeline; + + } + /// The method to set the value to pipeline + /// Instance of List + set + { + this.pipeline=value; + + this.keyModified["pipeline"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Delete.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Delete.cs new file mode 100644 index 0000000..be33983 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Delete.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class Delete : Model + { + private bool? permanent; + private Dictionary keyModified=new Dictionary(); + + public bool? Permanent + { + /// The method to get the permanent + /// bool? representing the permanent + get + { + return this.permanent; + + } + /// The method to set the value to permanent + /// bool? + set + { + this.permanent=value; + + this.keyModified["permanent"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ForecastCategory.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ForecastCategory.cs new file mode 100644 index 0000000..b76a1d4 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ForecastCategory.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class ForecastCategory : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/JsonDetails.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/JsonDetails.cs new file mode 100644 index 0000000..341878b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/JsonDetails.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class JsonDetails : Model + { + private string apiName; + private string jsonPath; + private string expectedDataType; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public string JsonPath + { + /// The method to get the jsonPath + /// string representing the jsonPath + get + { + return this.jsonPath; + + } + /// The method to set the value to jsonPath + /// string + set + { + this.jsonPath=value; + + this.keyModified["json_path"] = 1; + + } + } + + public string ExpectedDataType + { + /// The method to get the expectedDataType + /// string representing the expectedDataType + get + { + return this.expectedDataType; + + } + /// The method to set the value to expectedDataType + /// string + set + { + this.expectedDataType=value; + + this.keyModified["expected_data_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Maps.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Maps.cs new file mode 100644 index 0000000..28b22e3 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Maps.cs @@ -0,0 +1,206 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class Maps : Model + { + private string displayValue; + private int? sequenceNumber; + private ForecastCategory forecastCategory; + private bool? delete; + private string actualValue; + private long? id; + private string colourCode; + private string forecastType; + private Dictionary keyModified=new Dictionary(); + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public int? SequenceNumber + { + /// The method to get the sequenceNumber + /// int? representing the sequenceNumber + get + { + return this.sequenceNumber; + + } + /// The method to set the value to sequenceNumber + /// int? + set + { + this.sequenceNumber=value; + + this.keyModified["sequence_number"] = 1; + + } + } + + public ForecastCategory ForecastCategory + { + /// The method to get the forecastCategory + /// Instance of ForecastCategory + get + { + return this.forecastCategory; + + } + /// The method to set the value to forecastCategory + /// Instance of ForecastCategory + set + { + this.forecastCategory=value; + + this.keyModified["forecast_category"] = 1; + + } + } + + public bool? Delete + { + /// The method to get the delete + /// bool? representing the delete + get + { + return this.delete; + + } + /// The method to set the value to delete + /// bool? + set + { + this.delete=value; + + this.keyModified["_delete"] = 1; + + } + } + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string ColourCode + { + /// The method to get the colourCode + /// string representing the colourCode + get + { + return this.colourCode; + + } + /// The method to set the value to colourCode + /// string + set + { + this.colourCode=value; + + this.keyModified["colour_code"] = 1; + + } + } + + public string ForecastType + { + /// The method to get the forecastType + /// string representing the forecastType + get + { + return this.forecastType; + + } + /// The method to set the value to forecastType + /// string + set + { + this.forecastType=value; + + this.keyModified["forecast_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Pipeline.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Pipeline.cs new file mode 100644 index 0000000..3115492 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Pipeline.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class Pipeline : Model + { + private string displayValue; + private bool? default1; + private List maps; + private string actualValue; + private long? id; + private bool? childAvailable; + private Pipeline parent; + private Dictionary keyModified=new Dictionary(); + + public string DisplayValue + { + /// The method to get the displayValue + /// string representing the displayValue + get + { + return this.displayValue; + + } + /// The method to set the value to displayValue + /// string + set + { + this.displayValue=value; + + this.keyModified["display_value"] = 1; + + } + } + + public bool? Default + { + /// The method to get the default + /// bool? representing the default1 + get + { + return this.default1; + + } + /// The method to set the value to default + /// bool? + set + { + this.default1=value; + + this.keyModified["default"] = 1; + + } + } + + public List Maps + { + /// The method to get the maps + /// Instance of List + get + { + return this.maps; + + } + /// The method to set the value to maps + /// Instance of List + set + { + this.maps=value; + + this.keyModified["maps"] = 1; + + } + } + + public string ActualValue + { + /// The method to get the actualValue + /// string representing the actualValue + get + { + return this.actualValue; + + } + /// The method to set the value to actualValue + /// string + set + { + this.actualValue=value; + + this.keyModified["actual_value"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public bool? ChildAvailable + { + /// The method to get the childAvailable + /// bool? representing the childAvailable + get + { + return this.childAvailable; + + } + /// The method to set the value to childAvailable + /// bool? + set + { + this.childAvailable=value; + + this.keyModified["child_available"] = 1; + + } + } + + public Pipeline Parent + { + /// The method to get the parent + /// Instance of Pipeline + get + { + return this.parent; + + } + /// The method to set the value to parent + /// Instance of Pipeline + set + { + this.parent=value; + + this.keyModified["parent"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/PipelineOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/PipelineOperations.cs new file mode 100644 index 0000000..6446b61 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/PipelineOperations.cs @@ -0,0 +1,256 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class PipelineOperations + { + private long? layoutId; + + /// /// Creates an instance of PipelineOperations with the given parameters + /// long? + + public PipelineOperations(long? layoutId) + { + this.layoutId=layoutId; + + + } + + /// The method to get pipelines + /// Instance of APIResponse + public APIResponse GetPipelines() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/pipeline"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.GetPipelinesParam"), this.layoutId); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create pipeline + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreatePipeline(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/pipeline"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.CreatePipelineParam"), this.layoutId); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to update pipelines + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdatePipelines(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/pipeline"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + handlerInstance.AddParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.UpdatePipelinesParam"), this.layoutId); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get pipeline + /// long? + /// Instance of APIResponse + public APIResponse GetPipeline(long? id) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/pipeline/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.AddParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.GetPipelineParam"), this.layoutId); + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update pipeline + /// long? + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdatePipeline(long? id, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/pipeline/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PATCH; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.AddParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.UpdatePipelineParam"), this.layoutId); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete pipeline + /// long? + /// Instance of DPipelineWrapper + /// Instance of APIResponse + public APIResponse DeletePipeline(long? id, DPipelineWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/pipeline/"); + + apiPath=string.Concat(apiPath, id.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PATCH; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.AddParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.DeletePipelineParam"), this.layoutId); + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to transfer pipelines + /// Instance of TransferPipelineWrapper + /// Instance of APIResponse + public APIResponse TransferPipelines(TransferPipelineWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/pipeline/actions/transfer"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.AddParam(new Param("layout_id", "com.zoho.crm.api.Pipeline.TransferPipelinesParam"), this.layoutId); + + return handlerInstance.APICall(typeof(TransferPipelineActionHandler), "application/json"); + + + } + + + public static class GetPipelinesParam + { + } + + + public static class CreatePipelineParam + { + } + + + public static class UpdatePipelinesParam + { + } + + + public static class GetPipelineParam + { + } + + + public static class UpdatePipelineParam + { + } + + + public static class DeletePipelineParam + { + } + + + public static class TransferPipelinesParam + { + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ResponseHandler.cs new file mode 100644 index 0000000..c254f41 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Pipeline +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ResponseWrapper.cs new file mode 100644 index 0000000..2fe6ceb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List pipeline; + private Dictionary keyModified=new Dictionary(); + + public List Pipeline + { + /// The method to get the pipeline + /// Instance of List + get + { + return this.pipeline; + + } + /// The method to set the value to pipeline + /// Instance of List + set + { + this.pipeline=value; + + this.keyModified["pipeline"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Stages.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Stages.cs new file mode 100644 index 0000000..f3ce7bc --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/Stages.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class Stages : Model + { + private long? from; + private long? to; + private Dictionary keyModified=new Dictionary(); + + public long? From + { + /// The method to get the from + /// long? representing the from + get + { + return this.from; + + } + /// The method to set the value to from + /// long? + set + { + this.from=value; + + this.keyModified["from"] = 1; + + } + } + + public long? To + { + /// The method to get the to + /// long? representing the to + get + { + return this.to; + + } + /// The method to set the value to to + /// long? + set + { + this.to=value; + + this.keyModified["to"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/SuccessResponse.cs new file mode 100644 index 0000000..561652b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TPipeline.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TPipeline.cs new file mode 100644 index 0000000..1632894 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TPipeline.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class TPipeline : Model + { + private long? from; + private long? to; + private Dictionary keyModified=new Dictionary(); + + public long? From + { + /// The method to get the from + /// long? representing the from + get + { + return this.from; + + } + /// The method to set the value to from + /// long? + set + { + this.from=value; + + this.keyModified["from"] = 1; + + } + } + + public long? To + { + /// The method to get the to + /// long? representing the to + get + { + return this.to; + + } + /// The method to set the value to to + /// long? + set + { + this.to=value; + + this.keyModified["to"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipeline.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipeline.cs new file mode 100644 index 0000000..d7eb65e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipeline.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class TransferPipeline : Model + { + private TPipeline pipeline; + private List stages; + private Dictionary keyModified=new Dictionary(); + + public TPipeline Pipeline + { + /// The method to get the pipeline + /// Instance of TPipeline + get + { + return this.pipeline; + + } + /// The method to set the value to pipeline + /// Instance of TPipeline + set + { + this.pipeline=value; + + this.keyModified["pipeline"] = 1; + + } + } + + public List Stages + { + /// The method to get the stages + /// Instance of List + get + { + return this.stages; + + } + /// The method to set the value to stages + /// Instance of List + set + { + this.stages=value; + + this.keyModified["stages"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionHandler.cs new file mode 100644 index 0000000..5202269 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Pipeline +{ + + public interface TransferPipelineActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionResponse.cs new file mode 100644 index 0000000..98c9d4f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Pipeline +{ + + public interface TransferPipelineActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionWrapper.cs new file mode 100644 index 0000000..cfd89a6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class TransferPipelineActionWrapper : Model, TransferPipelineActionHandler + { + private List transferPipeline; + private Dictionary keyModified=new Dictionary(); + + public List TransferPipeline + { + /// The method to get the transferPipeline + /// Instance of List + get + { + return this.transferPipeline; + + } + /// The method to set the value to transferPipeline + /// Instance of List + set + { + this.transferPipeline=value; + + this.keyModified["transfer_pipeline"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineSuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineSuccessResponse.cs new file mode 100644 index 0000000..673e0f6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineSuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class TransferPipelineSuccessResponse : Model, TransferPipelineActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineWrapper.cs new file mode 100644 index 0000000..cd0bd2f --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Pipeline/TransferPipelineWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Pipeline +{ + + public class TransferPipelineWrapper : Model + { + private List transferPipeline; + private Dictionary keyModified=new Dictionary(); + + public List TransferPipeline + { + /// The method to get the transferPipeline + /// Instance of List + get + { + return this.transferPipeline; + + } + /// The method to set the value to transferPipeline + /// Instance of List + set + { + this.transferPipeline=value; + + this.keyModified["transfer_pipeline"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/APIException.cs new file mode 100644 index 0000000..699b450 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class APIException : Model, Data, ActionHandler, ActionResponse + { + private Choice status; + private Choice code; + private string message; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionHandler.cs new file mode 100644 index 0000000..6f7baf0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionResponse.cs new file mode 100644 index 0000000..1da0ebb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionWrapper.cs new file mode 100644 index 0000000..2e92cc5 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class ActionWrapper : Model, ActionHandler + { + private List portalInvite; + private Dictionary keyModified=new Dictionary(); + + public List PortalInvite + { + /// The method to get the portalInvite + /// Instance of List + get + { + return this.portalInvite; + + } + /// The method to set the value to portalInvite + /// Instance of List + set + { + this.portalInvite=value; + + this.keyModified["portal_invite"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/BodyWrapper.cs new file mode 100644 index 0000000..4c78461 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class BodyWrapper : Model + { + private List portalInvite; + private Dictionary keyModified=new Dictionary(); + + public List PortalInvite + { + /// The method to get the portalInvite + /// Instance of List + get + { + return this.portalInvite; + + } + /// The method to set the value to portalInvite + /// Instance of List + set + { + this.portalInvite=value; + + this.keyModified["portal_invite"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/Data.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/Data.cs new file mode 100644 index 0000000..7c1329b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/Data.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public interface Data + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/JobResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/JobResponse.cs new file mode 100644 index 0000000..bb02562 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/JobResponse.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class JobResponse : Model + { + private List data; + private long? jobId; + private string status; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + public long? JobId + { + /// The method to get the jobId + /// long? representing the jobId + get + { + return this.jobId; + + } + /// The method to set the value to jobId + /// long? + set + { + this.jobId=value; + + this.keyModified["job_id"] = 1; + + } + } + + public string Status + { + /// The method to get the status + /// string representing the status + get + { + return this.status; + + } + /// The method to set the value to status + /// string + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/Portal.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/Portal.cs new file mode 100644 index 0000000..9ad1978 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/Portal.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class Portal : Model + { + private long? id; + private long? userTypeId; + private Choice type; + private Choice language; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public long? UserTypeId + { + /// The method to get the userTypeId + /// long? representing the userTypeId + get + { + return this.userTypeId; + + } + /// The method to set the value to userTypeId + /// long? + set + { + this.userTypeId=value; + + this.keyModified["user_type_id"] = 1; + + } + } + + public Choice Type + { + /// The method to get the type + /// Instance of Choice + get + { + return this.type; + + } + /// The method to set the value to type + /// Instance of Choice + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public Choice Language + { + /// The method to get the language + /// Instance of Choice + get + { + return this.language; + + } + /// The method to set the value to language + /// Instance of Choice + set + { + this.language=value; + + this.keyModified["language"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/PortalInvite.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/PortalInvite.cs new file mode 100644 index 0000000..78cab36 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/PortalInvite.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class PortalInvite : Model + { + private List data; + private Dictionary keyModified=new Dictionary(); + + public List Data + { + /// The method to get the data + /// Instance of List + get + { + return this.data; + + } + /// The method to set the value to data + /// Instance of List + set + { + this.data=value; + + this.keyModified["data"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/PortalInviteOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/PortalInviteOperations.cs new file mode 100644 index 0000000..ec8a8d7 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/PortalInviteOperations.cs @@ -0,0 +1,63 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class PortalInviteOperations + { + private string module; + + /// /// Creates an instance of PortalInviteOperations with the given parameters + /// string + + public PortalInviteOperations(string module) + { + this.module=module; + + + } + + /// The method to invite users + /// long? + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse InviteUsers(long? record, ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/"); + + apiPath=string.Concat(apiPath, this.module.ToString()); + + apiPath=string.Concat(apiPath, "/"); + + apiPath=string.Concat(apiPath, record.ToString()); + + apiPath=string.Concat(apiPath, "/actions/portal_invite"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_ACTION; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class InviteUsersParam + { + public static readonly Param USER_TYPE_ID=new Param("user_type_id", "com.zoho.crm.api.PortalInvite.InviteUsersParam"); + public static readonly Param> TYPE=new Param>("type", "com.zoho.crm.api.PortalInvite.InviteUsersParam"); + public static readonly Param> LANGUAGE=new Param>("language", "com.zoho.crm.api.PortalInvite.InviteUsersParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ResponseWrapper.cs new file mode 100644 index 0000000..5fb1d21 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class ResponseWrapper : Model + { + private List portalInvite; + private Dictionary keyModified=new Dictionary(); + + public List PortalInvite + { + /// The method to get the portalInvite + /// Instance of List + get + { + return this.portalInvite; + + } + /// The method to set the value to portalInvite + /// Instance of List + set + { + this.portalInvite=value; + + this.keyModified["portal_invite"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/SuccessResponse.cs new file mode 100644 index 0000000..8dcb108 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalInvite/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalInvite +{ + + public class SuccessResponse : Model, Data, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/APIException.cs new file mode 100644 index 0000000..bd49ab8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class APIException : Model, ResponseHandler, ActionHandler, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionHandler.cs new file mode 100644 index 0000000..8c4a2f1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionResponse.cs new file mode 100644 index 0000000..d3e198e --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionWrapper.cs new file mode 100644 index 0000000..9240518 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class ActionWrapper : Model, ActionHandler + { + private List userType; + private Dictionary keyModified=new Dictionary(); + + public List UserType + { + /// The method to get the userType + /// Instance of List + get + { + return this.userType; + + } + /// The method to set the value to userType + /// Instance of List + set + { + this.userType=value; + + this.keyModified["user_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/BodyWrapper.cs new file mode 100644 index 0000000..1e49378 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class BodyWrapper : Model + { + private List userType; + private Dictionary keyModified=new Dictionary(); + + public List UserType + { + /// The method to get the userType + /// Instance of List + get + { + return this.userType; + + } + /// The method to set the value to userType + /// Instance of List + set + { + this.userType=value; + + this.keyModified["user_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Fields.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Fields.cs new file mode 100644 index 0000000..4cc454d --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Fields.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class Fields : Model + { + private bool? readOnly; + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public bool? ReadOnly + { + /// The method to get the readOnly + /// bool? representing the readOnly + get + { + return this.readOnly; + + } + /// The method to set the value to readOnly + /// bool? + set + { + this.readOnly=value; + + this.keyModified["read_only"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Filters.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Filters.cs new file mode 100644 index 0000000..2f6ceda --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Filters.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class Filters : Model + { + private string displayLabel; + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Layouts.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Layouts.cs new file mode 100644 index 0000000..4cce263 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Layouts.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class Layouts : Model + { + private string displayLabel; + private string name; + private long? id; + private Views defaultview; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public Views Defaultview + { + /// The method to get the defaultview + /// Instance of Views + get + { + return this.defaultview; + + } + /// The method to set the value to defaultview + /// Instance of Views + set + { + this.defaultview=value; + + this.keyModified["_default_view"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Modules.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Modules.cs new file mode 100644 index 0000000..01e61b8 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Modules.cs @@ -0,0 +1,227 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class Modules : Model + { + private long? id; + private string pluralLabel; + private string sharedType; + private string apiName; + private List filters; + private List fields; + private List layouts; + private Views views; + private Permissions permissions; + private Dictionary keyModified=new Dictionary(); + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string PluralLabel + { + /// The method to get the pluralLabel + /// string representing the pluralLabel + get + { + return this.pluralLabel; + + } + /// The method to set the value to pluralLabel + /// string + set + { + this.pluralLabel=value; + + this.keyModified["plural_label"] = 1; + + } + } + + public string SharedType + { + /// The method to get the sharedType + /// string representing the sharedType + get + { + return this.sharedType; + + } + /// The method to set the value to sharedType + /// string + set + { + this.sharedType=value; + + this.keyModified["shared_type"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public List Filters + { + /// The method to get the filters + /// Instance of List + get + { + return this.filters; + + } + /// The method to set the value to filters + /// Instance of List + set + { + this.filters=value; + + this.keyModified["filters"] = 1; + + } + } + + public List Fields + { + /// The method to get the fields + /// Instance of List + get + { + return this.fields; + + } + /// The method to set the value to fields + /// Instance of List + set + { + this.fields=value; + + this.keyModified["fields"] = 1; + + } + } + + public List Layouts + { + /// The method to get the layouts + /// Instance of List + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of List + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + public Views Views + { + /// The method to get the views + /// Instance of Views + get + { + return this.views; + + } + /// The method to set the value to views + /// Instance of Views + set + { + this.views=value; + + this.keyModified["views"] = 1; + + } + } + + public Permissions Permissions + { + /// The method to get the permissions + /// Instance of Permissions + get + { + return this.permissions; + + } + /// The method to set the value to permissions + /// Instance of Permissions + set + { + this.permissions=value; + + this.keyModified["permissions"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Owner.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Owner.cs new file mode 100644 index 0000000..93870b6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Owner.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class Owner : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Permissions.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Permissions.cs new file mode 100644 index 0000000..153a1e1 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Permissions.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class Permissions : Model + { + private bool? view; + private bool? edit; + private bool? editSharedRecords; + private bool? create; + private bool? delete; + private bool? deleteAttachment; + private bool? createAttachment; + private Dictionary keyModified=new Dictionary(); + + public bool? View + { + /// The method to get the view + /// bool? representing the view + get + { + return this.view; + + } + /// The method to set the value to view + /// bool? + set + { + this.view=value; + + this.keyModified["view"] = 1; + + } + } + + public bool? Edit + { + /// The method to get the edit + /// bool? representing the edit + get + { + return this.edit; + + } + /// The method to set the value to edit + /// bool? + set + { + this.edit=value; + + this.keyModified["edit"] = 1; + + } + } + + public bool? EditSharedRecords + { + /// The method to get the editSharedRecords + /// bool? representing the editSharedRecords + get + { + return this.editSharedRecords; + + } + /// The method to set the value to editSharedRecords + /// bool? + set + { + this.editSharedRecords=value; + + this.keyModified["edit_shared_records"] = 1; + + } + } + + public bool? Create + { + /// The method to get the create + /// bool? representing the create + get + { + return this.create; + + } + /// The method to set the value to create + /// bool? + set + { + this.create=value; + + this.keyModified[Constants.REQUEST_CATEGORY_CREATE] = 1; + + } + } + + public bool? Delete + { + /// The method to get the delete + /// bool? representing the delete + get + { + return this.delete; + + } + /// The method to set the value to delete + /// bool? + set + { + this.delete=value; + + this.keyModified[Constants.REQUEST_METHOD_DELETE] = 1; + + } + } + + public bool? DeleteAttachment + { + /// The method to get the deleteAttachment + /// bool? representing the deleteAttachment + get + { + return this.deleteAttachment; + + } + /// The method to set the value to deleteAttachment + /// bool? + set + { + this.deleteAttachment=value; + + this.keyModified["delete_attachment"] = 1; + + } + } + + public bool? CreateAttachment + { + /// The method to get the createAttachment + /// bool? representing the createAttachment + get + { + return this.createAttachment; + + } + /// The method to set the value to createAttachment + /// bool? + set + { + this.createAttachment=value; + + this.keyModified["create_attachment"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/PersonalityModule.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/PersonalityModule.cs new file mode 100644 index 0000000..f99427a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/PersonalityModule.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class PersonalityModule : Model + { + private string apiName; + private long? id; + private string pluralLabel; + private Dictionary keyModified=new Dictionary(); + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string PluralLabel + { + /// The method to get the pluralLabel + /// string representing the pluralLabel + get + { + return this.pluralLabel; + + } + /// The method to set the value to pluralLabel + /// string + set + { + this.pluralLabel=value; + + this.keyModified["plural_label"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/PortalUserTypeOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/PortalUserTypeOperations.cs new file mode 100644 index 0000000..b757f79 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/PortalUserTypeOperations.cs @@ -0,0 +1,179 @@ +using Com.Zoho.Crm.API; +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class PortalUserTypeOperations + { + private string portal; + + /// /// Creates an instance of PortalUserTypeOperations with the given parameters + /// string + + public PortalUserTypeOperations(string portal) + { + this.portal=portal; + + + } + + /// The method to get user types + /// Instance of ParameterMap + /// Instance of APIResponse + public APIResponse GetUserTypes(ParameterMap paramInstance) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals/"); + + apiPath=string.Concat(apiPath, this.portal.ToString()); + + apiPath=string.Concat(apiPath, "/user_type"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + handlerInstance.Param=paramInstance; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create user type + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreateUserType(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals/"); + + apiPath=string.Concat(apiPath, this.portal.ToString()); + + apiPath=string.Concat(apiPath, "/user_type"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get user type + /// string + /// Instance of APIResponse + public APIResponse GetUserType(string userTypeId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals/"); + + apiPath=string.Concat(apiPath, this.portal.ToString()); + + apiPath=string.Concat(apiPath, "/user_type/"); + + apiPath=string.Concat(apiPath, userTypeId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update user type + /// string + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdateUserType(string userTypeId, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals/"); + + apiPath=string.Concat(apiPath, this.portal.ToString()); + + apiPath=string.Concat(apiPath, "/user_type/"); + + apiPath=string.Concat(apiPath, userTypeId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to delete user type + /// string + /// Instance of APIResponse + public APIResponse DeleteUserType(string userTypeId) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals/"); + + apiPath=string.Concat(apiPath, this.portal.ToString()); + + apiPath=string.Concat(apiPath, "/user_type/"); + + apiPath=string.Concat(apiPath, userTypeId.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_DELETE; + + handlerInstance.CategoryMethod=Constants.REQUEST_METHOD_DELETE; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + public static class GetUserTypesParam + { + public static readonly Param INCLUDE=new Param("include", "com.zoho.crm.api.PortalUserType.GetUserTypesParam"); + } + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ResponseHandler.cs new file mode 100644 index 0000000..b12449a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ResponseWrapper.cs new file mode 100644 index 0000000..42761e6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List userType; + private Dictionary keyModified=new Dictionary(); + + public List UserType + { + /// The method to get the userType + /// Instance of List + get + { + return this.userType; + + } + /// The method to set the value to userType + /// Instance of List + set + { + this.userType=value; + + this.keyModified["user_type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/SuccessResponse.cs new file mode 100644 index 0000000..812e89a --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Choice status; + private Dictionary details; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/UserType.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/UserType.cs new file mode 100644 index 0000000..b209501 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/UserType.cs @@ -0,0 +1,270 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class UserType : Model + { + private PersonalityModule personalityModule; + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private Owner modifiedBy; + private Owner createdBy; + private string name; + private bool? active; + private bool? default1; + private int? noOfUsers; + private long? id; + private List modules; + private Dictionary keyModified=new Dictionary(); + + public PersonalityModule PersonalityModule + { + /// The method to get the personalityModule + /// Instance of PersonalityModule + get + { + return this.personalityModule; + + } + /// The method to set the value to personalityModule + /// Instance of PersonalityModule + set + { + this.personalityModule=value; + + this.keyModified["personality_module"] = 1; + + } + } + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public Owner ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of Owner + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of Owner + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public Owner CreatedBy + { + /// The method to get the createdBy + /// Instance of Owner + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of Owner + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public bool? Active + { + /// The method to get the active + /// bool? representing the active + get + { + return this.active; + + } + /// The method to set the value to active + /// bool? + set + { + this.active=value; + + this.keyModified["active"] = 1; + + } + } + + public bool? Default + { + /// The method to get the default + /// bool? representing the default1 + get + { + return this.default1; + + } + /// The method to set the value to default + /// bool? + set + { + this.default1=value; + + this.keyModified["default"] = 1; + + } + } + + public int? NoOfUsers + { + /// The method to get the noOfUsers + /// int? representing the noOfUsers + get + { + return this.noOfUsers; + + } + /// The method to set the value to noOfUsers + /// int? + set + { + this.noOfUsers=value; + + this.keyModified["no_of_users"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public List Modules + { + /// The method to get the modules + /// Instance of List + get + { + return this.modules; + + } + /// The method to set the value to modules + /// Instance of List + set + { + this.modules=value; + + this.keyModified["modules"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Views.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Views.cs new file mode 100644 index 0000000..e933b53 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalUserType/Views.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalUserType +{ + + public class Views : Model + { + private string displayLabel; + private string name; + private long? id; + private string type; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/APIException.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/APIException.cs new file mode 100644 index 0000000..22bcf98 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/APIException.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class APIException : Model, ActionResponse, ResponseHandler, ActionHandler + { + private Choice code; + private string message; + private Dictionary details; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionHandler.cs new file mode 100644 index 0000000..c8347d0 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Portals +{ + + public interface ActionHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionResponse.cs new file mode 100644 index 0000000..a90733b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionResponse.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Portals +{ + + public interface ActionResponse + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionWrapper.cs new file mode 100644 index 0000000..bf2c86b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ActionWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class ActionWrapper : Model, ActionHandler + { + private List portals; + private Dictionary keyModified=new Dictionary(); + + public List Portals + { + /// The method to get the portals + /// Instance of List + get + { + return this.portals; + + } + /// The method to set the value to portals + /// Instance of List + set + { + this.portals=value; + + this.keyModified["portals"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/BodyWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/BodyWrapper.cs new file mode 100644 index 0000000..aa5d945 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/BodyWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class BodyWrapper : Model + { + private List portals; + private Dictionary keyModified=new Dictionary(); + + public List Portals + { + /// The method to get the portals + /// Instance of List + get + { + return this.portals; + + } + /// The method to set the value to portals + /// Instance of List + set + { + this.portals=value; + + this.keyModified["portals"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/Owner.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/Owner.cs new file mode 100644 index 0000000..9db9772 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/Owner.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class Owner : Model + { + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/Portals.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/Portals.cs new file mode 100644 index 0000000..0065899 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/Portals.cs @@ -0,0 +1,186 @@ +using Com.Zoho.Crm.API.Util; +using System; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class Portals : Model + { + private DateTimeOffset? createdTime; + private DateTimeOffset? modifiedTime; + private Owner modifiedBy; + private Owner createdBy; + private string zaid; + private string name; + private bool? active; + private Dictionary keyModified=new Dictionary(); + + public DateTimeOffset? CreatedTime + { + /// The method to get the createdTime + /// DateTimeOffset? representing the createdTime + get + { + return this.createdTime; + + } + /// The method to set the value to createdTime + /// DateTimeOffset? + set + { + this.createdTime=value; + + this.keyModified["created_time"] = 1; + + } + } + + public DateTimeOffset? ModifiedTime + { + /// The method to get the modifiedTime + /// DateTimeOffset? representing the modifiedTime + get + { + return this.modifiedTime; + + } + /// The method to set the value to modifiedTime + /// DateTimeOffset? + set + { + this.modifiedTime=value; + + this.keyModified["modified_time"] = 1; + + } + } + + public Owner ModifiedBy + { + /// The method to get the modifiedBy + /// Instance of Owner + get + { + return this.modifiedBy; + + } + /// The method to set the value to modifiedBy + /// Instance of Owner + set + { + this.modifiedBy=value; + + this.keyModified["modified_by"] = 1; + + } + } + + public Owner CreatedBy + { + /// The method to get the createdBy + /// Instance of Owner + get + { + return this.createdBy; + + } + /// The method to set the value to createdBy + /// Instance of Owner + set + { + this.createdBy=value; + + this.keyModified["created_by"] = 1; + + } + } + + public string Zaid + { + /// The method to get the zaid + /// string representing the zaid + get + { + return this.zaid; + + } + /// The method to set the value to zaid + /// string + set + { + this.zaid=value; + + this.keyModified["zaid"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public bool? Active + { + /// The method to get the active + /// bool? representing the active + get + { + return this.active; + + } + /// The method to set the value to active + /// bool? + set + { + this.active=value; + + this.keyModified["active"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/PortalsOperations.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/PortalsOperations.cs new file mode 100644 index 0000000..4d2b179 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/PortalsOperations.cs @@ -0,0 +1,114 @@ +using Com.Zoho.Crm.API.Util; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class PortalsOperations + { + /// The method to get portals + /// Instance of APIResponse + public APIResponse GetPortals() + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to create portal + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse CreatePortal(BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals"); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_POST; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_CREATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + /// The method to get portal + /// string + /// Instance of APIResponse + public APIResponse GetPortal(string portalName) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals/"); + + apiPath=string.Concat(apiPath, portalName.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_GET; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_READ; + + return handlerInstance.APICall(typeof(ResponseHandler), "application/json"); + + + } + + /// The method to update portal + /// string + /// Instance of BodyWrapper + /// Instance of APIResponse + public APIResponse UpdatePortal(string portalName, BodyWrapper request) + { + CommonAPIHandler handlerInstance=new CommonAPIHandler(); + + string apiPath=""; + + apiPath=string.Concat(apiPath, "/crm/v7/settings/portals/"); + + apiPath=string.Concat(apiPath, portalName.ToString()); + + handlerInstance.APIPath=apiPath; + + handlerInstance.HttpMethod=Constants.REQUEST_METHOD_PUT; + + handlerInstance.CategoryMethod=Constants.REQUEST_CATEGORY_UPDATE; + + handlerInstance.ContentType="application/json"; + + handlerInstance.Request=request; + + handlerInstance.MandatoryChecker=true; + + return handlerInstance.APICall(typeof(ActionHandler), "application/json"); + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ResponseHandler.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ResponseHandler.cs new file mode 100644 index 0000000..01e7378 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ResponseHandler.cs @@ -0,0 +1,7 @@ +namespace Com.Zoho.Crm.API.Portals +{ + + public interface ResponseHandler + { + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ResponseWrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ResponseWrapper.cs new file mode 100644 index 0000000..cbbffbd --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/ResponseWrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class ResponseWrapper : Model, ResponseHandler + { + private List portals; + private Dictionary keyModified=new Dictionary(); + + public List Portals + { + /// The method to get the portals + /// Instance of List + get + { + return this.portals; + + } + /// The method to set the value to portals + /// Instance of List + set + { + this.portals=value; + + this.keyModified["portals"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/SuccessResponse.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/SuccessResponse.cs new file mode 100644 index 0000000..7e67332 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/Portals/SuccessResponse.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.Portals +{ + + public class SuccessResponse : Model, ActionResponse + { + private Choice code; + private string message; + private Dictionary details; + private Choice status; + private Dictionary keyModified=new Dictionary(); + + public Choice Code + { + /// The method to get the code + /// Instance of Choice + get + { + return this.code; + + } + /// The method to set the value to code + /// Instance of Choice + set + { + this.code=value; + + this.keyModified["code"] = 1; + + } + } + + public string Message + { + /// The method to get the message + /// string representing the message + get + { + return this.message; + + } + /// The method to set the value to message + /// string + set + { + this.message=value; + + this.keyModified["message"] = 1; + + } + } + + public Dictionary Details + { + /// The method to get the details + /// Dictionary representing the details + get + { + return this.details; + + } + /// The method to set the value to details + /// Dictionary + set + { + this.details=value; + + this.keyModified["details"] = 1; + + } + } + + public Choice Status + { + /// The method to get the status + /// Instance of Choice + get + { + return this.status; + + } + /// The method to set the value to status + /// Instance of Choice + set + { + this.status=value; + + this.keyModified["status"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Filters.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Filters.cs new file mode 100644 index 0000000..a5fedde --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Filters.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalsMeta +{ + + public class Filters : Model + { + private string displayLabel; + private string apiName; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Layouts.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Layouts.cs new file mode 100644 index 0000000..49bbcec --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Layouts.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalsMeta +{ + + public class Layouts : Model + { + private string displayLabel; + private string name; + private long? id; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Modules.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Modules.cs new file mode 100644 index 0000000..a8d1110 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Modules.cs @@ -0,0 +1,185 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalsMeta +{ + + public class Modules : Model + { + private string pluralLabel; + private string sharedType; + private string apiName; + private long? id; + private List filters; + private List layouts; + private List views; + private Dictionary keyModified=new Dictionary(); + + public string PluralLabel + { + /// The method to get the pluralLabel + /// string representing the pluralLabel + get + { + return this.pluralLabel; + + } + /// The method to set the value to pluralLabel + /// string + set + { + this.pluralLabel=value; + + this.keyModified["plural_label"] = 1; + + } + } + + public string SharedType + { + /// The method to get the sharedType + /// string representing the sharedType + get + { + return this.sharedType; + + } + /// The method to set the value to sharedType + /// string + set + { + this.sharedType=value; + + this.keyModified["shared_type"] = 1; + + } + } + + public string APIName + { + /// The method to get the aPIName + /// string representing the apiName + get + { + return this.apiName; + + } + /// The method to set the value to aPIName + /// string + set + { + this.apiName=value; + + this.keyModified["api_name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public List Filters + { + /// The method to get the filters + /// Instance of List + get + { + return this.filters; + + } + /// The method to set the value to filters + /// Instance of List + set + { + this.filters=value; + + this.keyModified["filters"] = 1; + + } + } + + public List Layouts + { + /// The method to get the layouts + /// Instance of List + get + { + return this.layouts; + + } + /// The method to set the value to layouts + /// Instance of List + set + { + this.layouts=value; + + this.keyModified["layouts"] = 1; + + } + } + + public List Views + { + /// The method to get the views + /// Instance of List + get + { + return this.views; + + } + /// The method to set the value to views + /// Instance of List + set + { + this.views=value; + + this.keyModified["views"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/RelatedLists.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/RelatedLists.cs new file mode 100644 index 0000000..00fedcb --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/RelatedLists.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalsMeta +{ + + public class RelatedLists : Model + { + private Modules module; + private Dictionary keyModified=new Dictionary(); + + public Modules Module + { + /// The method to get the module + /// Instance of Modules + get + { + return this.module; + + } + /// The method to set the value to module + /// Instance of Modules + set + { + this.module=value; + + this.keyModified["module"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Views.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Views.cs new file mode 100644 index 0000000..9452886 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Views.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalsMeta +{ + + public class Views : Model + { + private string displayLabel; + private string name; + private long? id; + private string type; + private Dictionary keyModified=new Dictionary(); + + public string DisplayLabel + { + /// The method to get the displayLabel + /// string representing the displayLabel + get + { + return this.displayLabel; + + } + /// The method to set the value to displayLabel + /// string + set + { + this.displayLabel=value; + + this.keyModified["display_label"] = 1; + + } + } + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public long? Id + { + /// The method to get the id + /// long? representing the id + get + { + return this.id; + + } + /// The method to set the value to id + /// long? + set + { + this.id=value; + + this.keyModified["id"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Wrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Wrapper.cs new file mode 100644 index 0000000..6fcb4cf --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PortalsMeta/Wrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PortalsMeta +{ + + public class Wrapper : Model + { + private List relatedLists; + private Dictionary keyModified=new Dictionary(); + + public List RelatedLists + { + /// The method to get the relatedLists + /// Instance of List + get + { + return this.relatedLists; + + } + /// The method to set the value to relatedLists + /// Instance of List + set + { + this.relatedLists=value; + + this.keyModified["related_lists"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyConfigurableApps/Apps.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyConfigurableApps/Apps.cs new file mode 100644 index 0000000..5b239e2 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyConfigurableApps/Apps.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PrivacyConfigurableApps +{ + + public class Apps : Model + { + private string name; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyConfigurableApps/Wrapper.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyConfigurableApps/Wrapper.cs new file mode 100644 index 0000000..5c3afca --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyConfigurableApps/Wrapper.cs @@ -0,0 +1,59 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PrivacyConfigurableApps +{ + + public class Wrapper : Model + { + private List privacyConfigurableApps; + private Dictionary keyModified=new Dictionary(); + + public List PrivacyConfigurableApps + { + /// The method to get the privacyConfigurableApps + /// Instance of List + get + { + return this.privacyConfigurableApps; + + } + /// The method to set the value to privacyConfigurableApps + /// Instance of List + set + { + this.privacyConfigurableApps=value; + + this.keyModified["privacy_configurable_apps"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Config.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Config.cs new file mode 100644 index 0000000..1175487 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Config.cs @@ -0,0 +1,101 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PrivacyPreference +{ + + public class Config : Model + { + private List tpt; + private List
section; + private List zohoInteg; + private Dictionary keyModified=new Dictionary(); + + public List Tpt + { + /// The method to get the tpt + /// Instance of List + get + { + return this.tpt; + + } + /// The method to set the value to tpt + /// Instance of List + set + { + this.tpt=value; + + this.keyModified["tpt"] = 1; + + } + } + + public List
Section + { + /// The method to get the section + /// Instance of List
+ get + { + return this.section; + + } + /// The method to set the value to section + /// Instance of List
+ set + { + this.section=value; + + this.keyModified["section"] = 1; + + } + } + + public List ZohoInteg + { + /// The method to get the zohoInteg + /// Instance of List + get + { + return this.zohoInteg; + + } + /// The method to set the value to zohoInteg + /// Instance of List + set + { + this.zohoInteg=value; + + this.keyModified["zoho_integ"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Option.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Option.cs new file mode 100644 index 0000000..9348e16 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Option.cs @@ -0,0 +1,122 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PrivacyPreference +{ + + public class Option : Model + { + private string name; + private string tooltip; + private string type; + private List suboptions; + private Dictionary keyModified=new Dictionary(); + + public string Name + { + /// The method to get the name + /// string representing the name + get + { + return this.name; + + } + /// The method to set the value to name + /// string + set + { + this.name=value; + + this.keyModified["name"] = 1; + + } + } + + public string Tooltip + { + /// The method to get the tooltip + /// string representing the tooltip + get + { + return this.tooltip; + + } + /// The method to set the value to tooltip + /// string + set + { + this.tooltip=value; + + this.keyModified["tooltip"] = 1; + + } + } + + public string Type + { + /// The method to get the type + /// string representing the type + get + { + return this.type; + + } + /// The method to set the value to type + /// string + set + { + this.type=value; + + this.keyModified["type"] = 1; + + } + } + + public List Suboptions + { + /// The method to get the suboptions + /// Instance of List + get + { + return this.suboptions; + + } + /// The method to set the value to suboptions + /// Instance of List + set + { + this.suboptions=value; + + this.keyModified["suboptions"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Preference.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Preference.cs new file mode 100644 index 0000000..d1ab1e6 --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Preference.cs @@ -0,0 +1,500 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PrivacyPreference +{ + + public class Preference : Model + { + private string consentModules; + private string restrictTptFields; + private string excludeAPIZoho; + private string awaitingPeriod; + private string consentMailSend; + private string excludeExportFields; + private string limitActions; + private string excludeExport; + private string restrictZohoInteg; + private string excludeAPIZohoFields; + private string durationTiming; + private string dataProcessingDuration; + private string restrictTptServices; + private string excludeAPITptFields; + private string restrictZohoIntegServices; + private string privacySettingStatus; + private string doubleOptIn; + private string restrictZohoIntegFields; + private string excludeAPITpt; + private string blockList; + private string restrictTpt; + private string actionsWhileAwaiting; + private Dictionary keyModified=new Dictionary(); + + public string ConsentModules + { + /// The method to get the consentModules + /// string representing the consentModules + get + { + return this.consentModules; + + } + /// The method to set the value to consentModules + /// string + set + { + this.consentModules=value; + + this.keyModified["consent_modules"] = 1; + + } + } + + public string RestrictTptFields + { + /// The method to get the restrictTptFields + /// string representing the restrictTptFields + get + { + return this.restrictTptFields; + + } + /// The method to set the value to restrictTptFields + /// string + set + { + this.restrictTptFields=value; + + this.keyModified["restrict_tpt_fields"] = 1; + + } + } + + public string ExcludeAPIZoho + { + /// The method to get the excludeAPIZoho + /// string representing the excludeAPIZoho + get + { + return this.excludeAPIZoho; + + } + /// The method to set the value to excludeAPIZoho + /// string + set + { + this.excludeAPIZoho=value; + + this.keyModified["exclude_api_zoho"] = 1; + + } + } + + public string AwaitingPeriod + { + /// The method to get the awaitingPeriod + /// string representing the awaitingPeriod + get + { + return this.awaitingPeriod; + + } + /// The method to set the value to awaitingPeriod + /// string + set + { + this.awaitingPeriod=value; + + this.keyModified["awaiting_period"] = 1; + + } + } + + public string ConsentMailSend + { + /// The method to get the consentMailSend + /// string representing the consentMailSend + get + { + return this.consentMailSend; + + } + /// The method to set the value to consentMailSend + /// string + set + { + this.consentMailSend=value; + + this.keyModified["consent_mail_send"] = 1; + + } + } + + public string ExcludeExportFields + { + /// The method to get the excludeExportFields + /// string representing the excludeExportFields + get + { + return this.excludeExportFields; + + } + /// The method to set the value to excludeExportFields + /// string + set + { + this.excludeExportFields=value; + + this.keyModified["exclude_export_fields"] = 1; + + } + } + + public string LimitActions + { + /// The method to get the limitActions + /// string representing the limitActions + get + { + return this.limitActions; + + } + /// The method to set the value to limitActions + /// string + set + { + this.limitActions=value; + + this.keyModified["limit_actions"] = 1; + + } + } + + public string ExcludeExport + { + /// The method to get the excludeExport + /// string representing the excludeExport + get + { + return this.excludeExport; + + } + /// The method to set the value to excludeExport + /// string + set + { + this.excludeExport=value; + + this.keyModified["exclude_export"] = 1; + + } + } + + public string RestrictZohoInteg + { + /// The method to get the restrictZohoInteg + /// string representing the restrictZohoInteg + get + { + return this.restrictZohoInteg; + + } + /// The method to set the value to restrictZohoInteg + /// string + set + { + this.restrictZohoInteg=value; + + this.keyModified["restrict_zoho_integ"] = 1; + + } + } + + public string ExcludeAPIZohoFields + { + /// The method to get the excludeAPIZohoFields + /// string representing the excludeAPIZohoFields + get + { + return this.excludeAPIZohoFields; + + } + /// The method to set the value to excludeAPIZohoFields + /// string + set + { + this.excludeAPIZohoFields=value; + + this.keyModified["exclude_api_zoho_fields"] = 1; + + } + } + + public string DurationTiming + { + /// The method to get the durationTiming + /// string representing the durationTiming + get + { + return this.durationTiming; + + } + /// The method to set the value to durationTiming + /// string + set + { + this.durationTiming=value; + + this.keyModified["duration_timing"] = 1; + + } + } + + public string DataProcessingDuration + { + /// The method to get the dataProcessingDuration + /// string representing the dataProcessingDuration + get + { + return this.dataProcessingDuration; + + } + /// The method to set the value to dataProcessingDuration + /// string + set + { + this.dataProcessingDuration=value; + + this.keyModified["data_processing_duration"] = 1; + + } + } + + public string RestrictTptServices + { + /// The method to get the restrictTptServices + /// string representing the restrictTptServices + get + { + return this.restrictTptServices; + + } + /// The method to set the value to restrictTptServices + /// string + set + { + this.restrictTptServices=value; + + this.keyModified["restrict_tpt_services"] = 1; + + } + } + + public string ExcludeAPITptFields + { + /// The method to get the excludeAPITptFields + /// string representing the excludeAPITptFields + get + { + return this.excludeAPITptFields; + + } + /// The method to set the value to excludeAPITptFields + /// string + set + { + this.excludeAPITptFields=value; + + this.keyModified["exclude_api_tpt_fields"] = 1; + + } + } + + public string RestrictZohoIntegServices + { + /// The method to get the restrictZohoIntegServices + /// string representing the restrictZohoIntegServices + get + { + return this.restrictZohoIntegServices; + + } + /// The method to set the value to restrictZohoIntegServices + /// string + set + { + this.restrictZohoIntegServices=value; + + this.keyModified["restrict_zoho_integ_services"] = 1; + + } + } + + public string PrivacySettingStatus + { + /// The method to get the privacySettingStatus + /// string representing the privacySettingStatus + get + { + return this.privacySettingStatus; + + } + /// The method to set the value to privacySettingStatus + /// string + set + { + this.privacySettingStatus=value; + + this.keyModified["privacy_setting_status"] = 1; + + } + } + + public string DoubleOptIn + { + /// The method to get the doubleOptIn + /// string representing the doubleOptIn + get + { + return this.doubleOptIn; + + } + /// The method to set the value to doubleOptIn + /// string + set + { + this.doubleOptIn=value; + + this.keyModified["double_opt_in"] = 1; + + } + } + + public string RestrictZohoIntegFields + { + /// The method to get the restrictZohoIntegFields + /// string representing the restrictZohoIntegFields + get + { + return this.restrictZohoIntegFields; + + } + /// The method to set the value to restrictZohoIntegFields + /// string + set + { + this.restrictZohoIntegFields=value; + + this.keyModified["restrict_zoho_integ_fields"] = 1; + + } + } + + public string ExcludeAPITpt + { + /// The method to get the excludeAPITpt + /// string representing the excludeAPITpt + get + { + return this.excludeAPITpt; + + } + /// The method to set the value to excludeAPITpt + /// string + set + { + this.excludeAPITpt=value; + + this.keyModified["exclude_api_tpt"] = 1; + + } + } + + public string BlockList + { + /// The method to get the blockList + /// string representing the blockList + get + { + return this.blockList; + + } + /// The method to set the value to blockList + /// string + set + { + this.blockList=value; + + this.keyModified["block_list"] = 1; + + } + } + + public string RestrictTpt + { + /// The method to get the restrictTpt + /// string representing the restrictTpt + get + { + return this.restrictTpt; + + } + /// The method to set the value to restrictTpt + /// string + set + { + this.restrictTpt=value; + + this.keyModified["restrict_tpt"] = 1; + + } + } + + public string ActionsWhileAwaiting + { + /// The method to get the actionsWhileAwaiting + /// string representing the actionsWhileAwaiting + get + { + return this.actionsWhileAwaiting; + + } + /// The method to set the value to actionsWhileAwaiting + /// string + set + { + this.actionsWhileAwaiting=value; + + this.keyModified["actions_while_awaiting"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/PrivacyPreference.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/PrivacyPreference.cs new file mode 100644 index 0000000..1d78a8b --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/PrivacyPreference.cs @@ -0,0 +1,80 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PrivacyPreference +{ + + public class PrivacyPreference : Model + { + private Preference preference; + private Config config; + private Dictionary keyModified=new Dictionary(); + + public Preference Preference + { + /// The method to get the preference + /// Instance of Preference + get + { + return this.preference; + + } + /// The method to set the value to preference + /// Instance of Preference + set + { + this.preference=value; + + this.keyModified["preference"] = 1; + + } + } + + public Config Config + { + /// The method to get the config + /// Instance of Config + get + { + return this.config; + + } + /// The method to set the value to config + /// Instance of Config + set + { + this.config=value; + + this.keyModified["config"] = 1; + + } + } + + /// The method to check if the user has modified the given key + /// string + /// int? representing the modification + public int? IsKeyModified(string key) + { + if((( this.keyModified.ContainsKey(key)))) + { + return this.keyModified[key]; + + } + return null; + + + } + + /// The method to mark the given key as modified + /// string + /// int? + public void SetKeyModified(string key, int? modification) + { + this.keyModified[key] = modification; + + + } + + + } +} \ No newline at end of file diff --git a/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Section.cs b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Section.cs new file mode 100644 index 0000000..c9421ef --- /dev/null +++ b/versions/3.0.0/ZohoCRM/Com/Zoho/Crm/API/PrivacyPreference/Section.cs @@ -0,0 +1,143 @@ +using Com.Zoho.Crm.API.Util; +using System.Collections.Generic; + +namespace Com.Zoho.Crm.API.PrivacyPreference +{ + + public class Section : Model + { + private string name; + private string tooltip; + private string showType; + private string title; + private List