Пример #1
0
 /// <summary>
 /// Add fictious partner contact. Currently have to use old Rest client API to insert record as this functionality not available in Web API yet.
 /// </summary>
 public static void AddBradPartner(string wsAccessKey, int fileuid)
 {
     var proxy = new Ola.RestClient.Proxies.ContactProxy();
     var dto = new Ola.RestClient.Dto.ContactDto()
     {
         Salutation = "Mr.",
         GivenName = "Brad",
         FamilyName = "O'Neil",
         OrganisationName = "O'Neil Partner",
         ContactID = "GLD881",
         CustomField1 = "O'NeilB",
         IsPartner = true,
         ContactType = (int)ContactType.Partner
     };
     proxy.Insert(dto);
     Assert.IsTrue(dto.Uid > 0, "Incorrect uid post save.");
 }
Пример #2
0
        /// <summary>
        /// Add fictious contractor contact. Currently have to use old Rest client API to insert record as this functionality not available in Web API yet.
        /// </summary>
        public static void AddKathyContractor(string wsAccessKey, int fileuid)
        {
            var proxy = new Ola.RestClient.Proxies.ContactProxy();
            var dto   = new Ola.RestClient.Dto.ContactDto()
            {
                Salutation       = "Ms.",
                GivenName        = "Kathy",
                FamilyName       = "O'Neil",
                OrganisationName = "O'Neil Contractor",
                ContactID        = "GLD882",
                CustomField1     = "O'NeilK",
                ContactType      = (int)Ola.RestClient.ContactType.Contractor
            };

            proxy.Insert(dto);
            Assert.IsTrue(dto.Uid > 0, "Incorrect uid post save.");
        }
Пример #3
0
        /// <summary>
        /// Add fictious partner contact. Currently have to use old Rest client API to insert record as this functionality not available in Web API yet.
        /// </summary>
        public static void AddBradPartner(string wsAccessKey, int fileuid)
        {
            var proxy = new Ola.RestClient.Proxies.ContactProxy();
            var dto   = new Ola.RestClient.Dto.ContactDto()
            {
                Salutation       = "Mr.",
                GivenName        = "Brad",
                FamilyName       = "O'Neil",
                OrganisationName = "O'Neil Partner",
                ContactID        = "GLD881",
                CustomField1     = "O'NeilB",
                IsPartner        = true,
                ContactType      = (int)ContactType.Partner
            };

            proxy.Insert(dto);
            Assert.IsTrue(dto.Uid > 0, "Incorrect uid post save.");
        }
Пример #4
0
 /// <summary>
 /// Add fictious customer contact. Currently have to use old Rest client API to insert record as this functionality not available in Web API yet.
 /// </summary>
 public static void AddCarlCustomer(string wsAccessKey, int fileuid)
 {
     var proxy = new Ola.RestClient.Proxies.ContactProxy();
     var dto = new Ola.RestClient.Dto.ContactDto()
     {
         Salutation = "Mr.",
         GivenName = "Carl",
         FamilyName = "O'Neil",
         OrganisationName = "O'Neil Capital",
         ContactID = "GLD879",
         CustomField1 = "O'NeilC",
         IsCustomer = true,
         ContactType = (int)ContactType.Customer,
         Tags = "carlTag1,carlTag2",
         Email = "*****@*****.**"
     };
     proxy.Insert(dto);
     Assert.IsTrue(dto.Uid > 0, "Incorrect uid post save.");
 }
Пример #5
0
        /// <summary>
        /// Add fictious customer contact. Currently have to use old Rest client API to insert record as this functionality not available in Web API yet.
        /// </summary>
        public static void AddCarlCustomer(string wsAccessKey, int fileuid)
        {
            var proxy = new Ola.RestClient.Proxies.ContactProxy();
            var dto   = new Ola.RestClient.Dto.ContactDto()
            {
                Salutation       = "Mr.",
                GivenName        = "Carl",
                FamilyName       = "O'Neil",
                OrganisationName = "O'Neil Capital",
                ContactID        = "GLD879",
                CustomField1     = "O'NeilC",
                IsCustomer       = true,
                ContactType      = (int)ContactType.Customer,
                Tags             = "carlTag1,carlTag2",
                Email            = "*****@*****.**"
            };

            proxy.Insert(dto);
            Assert.IsTrue(dto.Uid > 0, "Incorrect uid post save.");
        }
Пример #6
0
 /// <summary>
 /// Add fictious contractor contact. Currently have to use old Rest client API to insert record as this functionality not available in Web API yet.
 /// </summary>
 public static void AddKathyContractor(string wsAccessKey, int fileuid)
 {
     var proxy = new Ola.RestClient.Proxies.ContactProxy();
     var dto = new Ola.RestClient.Dto.ContactDto()
     {
         Salutation = "Ms.",
         GivenName = "Kathy",
         FamilyName = "O'Neil",
         OrganisationName = "O'Neil Contractor",
         ContactID = "GLD882",
         CustomField1 = "O'NeilK",
         ContactType = (int)Ola.RestClient.ContactType.Contractor
     };
     proxy.Insert(dto);
     Assert.IsTrue(dto.Uid > 0, "Incorrect uid post save.");
 }