コード例 #1
0
$customer->setBackground("I've worked with John before and he's really great.");
// Address
// ~~~~~
$address = new \HelpScout\model\customer\Address();
$address->setLines(array('500 Main St', 'Suite 23'));
$address->setCity('San Francisco');
$address->setState('CA');
$address->setPostalCode('94103');
$address->setCountry('US');
$customer->setAddress($address);
// Phones
// ~~~~~
$phoneWork = new \HelpScout\model\customer\PhoneEntry();
$phoneWork->setValue('800-555-1212');
$phoneWork->setLocation('work');
$phoneHome = new \HelpScout\model\customer\PhoneEntry();
$phoneHome->setValue('800-123-1234');
$phoneHome->setLocation('home');
$customer->setPhones(array($phoneWork, $phoneHome));
// Emails: at least one email is required
$emailHome = new \HelpScout\model\customer\EmailEntry();
$emailHome->setValue('*****@*****.**');
$emailHome->setLocation('home');
$emailWork = new \HelpScout\model\customer\EmailEntry();
$emailWork->setValue('*****@*****.**');
$emailWork->setLocation('work');
$customer->setEmails(array($emailWork, $emailHome));
// Social Profiles
$facebook = new \HelpScout\model\customer\SocialProfileEntry();
$facebook->setValue('https://facebook.com/john.appleseed');
$facebook->setType('facebook');
コード例 #2
0
 $customer->setBackground("I've worked with John before and he's really great.");
 // Address
 // ~~~~~
 $address = new \HelpScout\model\customer\Address();
 $address->setLines(array("500 Main St", "Suite 23"));
 $address->setCity("San Francisco");
 $address->setState("CA");
 $address->setPostalCode("94103");
 $address->setCountry("US");
 $customer->setAddress($address);
 // Phones
 // ~~~~~
 $phoneWork = new \HelpScout\model\customer\PhoneEntry();
 $phoneWork->setValue("800-555-1212");
 $phoneWork->setLocation("work");
 $phoneHome = new \HelpScout\model\customer\PhoneEntry();
 $phoneHome->setValue("800-123-1234");
 $phoneHome->setLocation("home");
 $customer->setPhones(array($phoneWork, $phoneHome));
 // Emails: at least one email is required
 $emailHome = new \HelpScout\model\customer\EmailEntry();
 $emailHome->setValue("*****@*****.**");
 $emailHome->setLocation("home");
 $emailWork = new \HelpScout\model\customer\EmailEntry();
 $emailWork->setValue("*****@*****.**");
 $emailWork->setLocation("work");
 $customer->setEmails(array($emailWork, $emailHome));
 // Social Profiles
 $facebook = new \HelpScout\model\customer\SocialProfileEntry();
 $facebook->setValue("https://facebook.com/john.appleseed");
 $facebook->setType("facebook");