public void CreateIndividualSampleCode1() { try { //Create an individual Customer with 1 address linked to employer and another individual address var a = new DataServiceCollection <SaveAddressInput>(null, TrackingMode.None); //Address linked to a company SaveAddressInput a1 = new SaveAddressInput() { AddressTypeCode = "WORK", //Address1 = "One DesCombes Drive", City = "Broomfield", State = "CO", PostalCode = "80020", CountryCode = "USA", OverrideAddressValidation = false, SetRelationshipAsPrimary = true, PrimaryAddress = true, CreateNewAddressIfOrdersExist = true, EndOldPrimaryRelationship = true, WebMobileDirectory = true, }; a.Add(a1); SaveCustomerInput s = new SaveCustomerInput() { FirstName = "Troy_New_Member", LastName = "Fulton", CustomerClassCode = "INDIV", Addresses = a, }; SaveCustomerOutput op = SvcClient.Post <SaveCustomerOutput>("CreateIndividual", s); op.Equals(op); } catch (Exception ex) { var message = ex.Message; var messages = message.ParseXML <Messages>(); throw ex; } }
public void CreateIndividualSampleCode2() { try { //Create an individual Customer with 1 address linked to employer and another individual address var a = new DataServiceCollection <SaveAddressInput>(null, TrackingMode.None); SaveCustomerInput s = new SaveCustomerInput() { FirstName = "Troy", LastName = "Fulton", CustomerClassCode = "INDIV" }; SaveCustomerOutput op = SvcClient.Post <SaveCustomerOutput>("CreateIndividual", s); op.Equals(op); } catch (Exception ex) { throw ex; } }