public void SaveContactRequestExampleById()
        {
            var expectedJson = @"{""contactID"":123,""email"":""*****@*****.**"",""firstName"":""John"",""lastName"":""Doe""}";
            var data = new ContactData
            {
                ContactId = 123,
                Email = "*****@*****.**",
                FirstName = "John",
                LastName = "Doe"
            };

            var actualJson = JsonHelper.Stringify(data);

            actualJson.Should().Be(expectedJson);
        }
        public void SaveContactRequestExampleByEmail()
        {
            var expectedJson = @"{""email"":""*****@*****.**"",""firstName"":""John"",""groupIDs"":[123,456,789],""lastName"":""Doe""}";

            var data = new ContactData
                {
                    Email = "*****@*****.**",
                    FirstName = "John",
                    LastName = "Doe",
                    GroupIds = new[] {123, 456, 789}
                };

            var actualJson = JsonHelper.Stringify(data);

            actualJson.Should().Be(expectedJson);
        }
예제 #3
0
 public SaveContactResponse SaveContact(ContactData contact)
 {
     var url = BaseServiceUrl + "contacts/save";
     return SubmitObject<SaveContactResponse, ContactData>(url, contact);
 }