private static OfficeContact GetOfficeAddressInfo(OfficeContact tempOfficeContact, PipedriveContact pipedriveContact)
        {
            // copy over all the pipedrive info intoa new office address location
            tempOfficeContact.HomeAddress = new OfficeAddress();

            // copy over all the office address information
            tempOfficeContact.HomeAddress.Street     = String.Concat(pipedriveContact.contact_address_1, pipedriveContact.contact_address_2);
            tempOfficeContact.HomeAddress.City       = pipedriveContact.contact_city;
            tempOfficeContact.HomeAddress.State      = pipedriveContact.contact_state;
            tempOfficeContact.HomeAddress.PostalCode = pipedriveContact.contact_zip;

            return(tempOfficeContact);
        }
        private static OfficeContact GetOfficeEmailInfo(OfficeContact tempOfficeContact, PipedriveContact pipedriveContact)
        {
            // copy all emails over
            if (pipedriveContact.email != null)
            {
                tempOfficeContact.EmailAddresses = new List <OfficeEmail>();

                foreach (PipeEmail email in pipedriveContact.email)
                {
                    tempOfficeContact.EmailAddresses.Add(new OfficeEmail()
                    {
                        Address = email.value, Name = email.label
                    });
                }
            }


            return(tempOfficeContact);
        }
Exemplo n.º 3
0
 public Contact(bool isOfficeContact, bool isPipedriveContact, OfficeContact officeContact, PipedriveContact pipedriveContact)
 {
     this.isOfficeContact    = isOfficeContact;
     this.isPipedriveContact = isPipedriveContact;
     this.officeContact      = officeContact;
     this.pipedriveContact   = pipedriveContact;
 }