Package com.google.api.ads.dfp.v201308

Examples of com.google.api.ads.dfp.v201308.Contact


      if (v1Contact != null)
      {
         Postal postal = toV2Postal(v1Contact.getPostal());
         Telecom teleCom = toV2Telecom(v1Contact.getTelecom());
         Online online = toV2Online(v1Contact.getOnline());
         Contact contact = WSRPTypeFactory.createContact(postal, teleCom, online);

         List<V1Extension> extensions = v1Contact.getExtensions();
         if (extensions != null)
         {
            contact.getExtensions().addAll(WSRPUtils.transform(extensions, EXTENSION));
         }

         return contact;
      }
      else
View Full Code Here


      String employer = userInfos.get(INFO_USER_EMPLOYER);
      String department = userInfos.get(INFO_USER_DEPARTMENT);
      String jobTitle = userInfos.get(INFO_USER_JOB_TITLE);
      EmployerInfo employerInfo = WSRPTypeFactory.createEmployerInfo(employer, department, jobTitle);

      Contact homeInfo = createContactFrom(userInfos, false);
      Contact businessInfo = createContactFrom(userInfos, true);
      UserProfile userProfile = WSRPTypeFactory.createUserProfile(name, bdate, userInfos.get(INFO_USER_GENDER), employerInfo, homeInfo, businessInfo);

      return userProfile;
   }
View Full Code Here

      TelephoneNum fax = createTelephoneNumFrom(infos, TelecomType.FAX, isBusiness);
      TelephoneNum mobile = createTelephoneNumFrom(infos, TelecomType.MOBILE, isBusiness);
      TelephoneNum pager = createTelephoneNumFrom(infos, TelecomType.PAGER, isBusiness);
      Telecom telecom = WSRPTypeFactory.createTelecom(telephone, fax, mobile, pager);
     
      Contact contact = WSRPTypeFactory.createContact(postal, telecom, online);

      return contact;
   }
View Full Code Here

      return setExportLifetime;
   }

   public static Contact createContact(Postal postal, Telecom telecom, Online online)
   {
      Contact contact = new Contact();
      contact.setPostal(postal);
      contact.setTelecom(telecom);
      contact.setOnline(online);

      return contact;
   }
View Full Code Here

      String employer = userInfos.get(INFO_USER_EMPLOYER);
      String department = userInfos.get(INFO_USER_DEPARTMENT);
      String jobTitle = userInfos.get(INFO_USER_JOB_TITLE);
      EmployerInfo employerInfo = WSRPTypeFactory.createEmployerInfo(employer, department, jobTitle);

      Contact homeInfo = createContactFrom(userInfos, false);
      Contact businessInfo = createContactFrom(userInfos, true);
      UserProfile userProfile = WSRPTypeFactory.createUserProfile(name, bdate, userInfos.get(INFO_USER_GENDER), employerInfo, homeInfo, businessInfo);

      return userProfile;
   }
View Full Code Here

      TelephoneNum fax = createTelephoneNumFrom(infos, TelecomType.FAX, isBusiness);
      TelephoneNum mobile = createTelephoneNumFrom(infos, TelecomType.MOBILE, isBusiness);
      TelephoneNum pager = createTelephoneNumFrom(infos, TelecomType.PAGER, isBusiness);
      Telecom telecom = WSRPTypeFactory.createTelecom(telephone, fax, mobile, pager);
     
      Contact contact = WSRPTypeFactory.createContact(postal, telecom, online);

      return contact;
   }
View Full Code Here

      return setExportLifetime;
   }

   public static Contact createContact(Postal postal, Telecom telecom, Online online)
   {
      Contact contact = new Contact();
      contact.setPostal(postal);
      contact.setTelecom(telecom);
      contact.setOnline(online);

      return contact;
   }
View Full Code Here

                List<Contact> r = new ArrayList<Contact>();
                if (contact == null) {
                        return r;
                }
                for (int i = 0; i < contact.size(); i++) {
                        Contact c = new Contact();
                        c.setUseType(contact.get(i).getUseType());
                        c.setPersonName(contact.get(i).getPersonName().get(0).getValue());
                        c.getAddress().addAll(MapAddress(contact.get(i).getAddress()));
                        c.getDescription().addAll(MapDescription(contact.get(i).getDescription()));
                        c.getEmail().addAll(MapEmail(contact.get(i).getEmail()));
                        c.getPhone().addAll(MapPhone(contact.get(i).getPhone()));
                       
                        r.add(c);
                }
                return r;
        }
View Full Code Here

    }
    assertEquals(contactList1.size(), contactList2.size());
    Iterator<Contact> contactList1Itr = contactList1.iterator();
    Iterator<Contact> contactList2Itr = contactList2.iterator();
    while (contactList1Itr.hasNext()) {
      Contact contact1 = contactList1Itr.next();
      Contact contact2 = contactList2Itr.next();
      assertEquals(contact1.getUseType(), contact2.getUseType());
     
      checkPersonNames(contact1.getPersonName(), contact2.getPersonName());
      checkDescriptions(contact1.getDescription(), contact2.getDescription());
    }
  }
View Full Code Here

    }
    assertEquals(contactList1.size(), contactList2.size());
    Iterator<Contact> contactList1Itr = contactList1.iterator();
    Iterator<Contact> contactList2Itr = contactList2.iterator();
    while (contactList1Itr.hasNext()) {
      Contact contact1 = contactList1Itr.next();
      Contact contact2 = contactList2Itr.next();
      assertEquals(contact1.getUseType(), contact2.getUseType());
     
      checkPersonNames(contact1.getPersonName(), contact2.getPersonName());
      checkDescriptions(contact1.getDescription(), contact2.getDescription());
    }
  }
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.v201308.Contact

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.