print_r($response->results); print "\n---------------\n"; print '>>> Delete profileAttrOne'; $profileattr = new ET_ProfileAttribute(); $profileattr->authStub = $myclient; $profileattr->props = array("Name" => $NameOfAttributeOne); $delResponse = $profileattr->delete(); print_r('Delete Status: ' . ($delResponse->status ? 'true' : 'false') . "\n"); print 'Code: ' . $delResponse->code . "\n"; print 'Message: ' . $delResponse->message . "\n"; print 'Results Length: ' . count($delResponse->results) . "\n"; print 'Results: ' . "\n"; print_r($delResponse->results); print "\n---------------\n"; print '>>> Delete profileAttrTwo'; $profileattr = new ET_ProfileAttribute(); $profileattr->authStub = $myclient; $profileattr->props = array("Name" => $NameOfAttributeTwo); $delResponse = $profileattr->delete(); print_r('Delete Status: ' . ($delResponse->status ? 'true' : 'false') . "\n"); print 'Code: ' . $delResponse->code . "\n"; print 'Message: ' . $delResponse->message . "\n"; print 'Results Length: ' . count($delResponse->results) . "\n"; print 'Results: ' . "\n"; print_r($delResponse->results); print "\n---------------\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } ?>
function CreateProfileAttributes($allAttributes) { $attrs = new ET_ProfileAttribute(); $attrs->authStub = $this; $attrs->props = $allAttributes; return $attrs->post(); }
print_r($getResponse->results); print "\n---------------\n"; print "Update ProfileAttribute \n"; $patchProfileAttribute = new ET_ProfileAttribute(); $patchProfileAttribute->authStub = $myclient; $patchProfileAttribute->props = array("Name" => $NameOfAttribute, "PropertyType" => "string"); $patchResponse = $patchProfileAttribute->patch(); print_r('Patch Status: ' . ($patchResponse->status ? 'true' : 'false') . "\n"); print 'Code: ' . $patchResponse->code . "\n"; print 'Message: ' . $patchResponse->message . "\n"; print 'Results Length: ' . count($patchResponse->results) . "\n"; print 'Results: ' . "\n"; print_r($patchResponse->results); print "\n---------------\n"; print "Delete ProfileAttribute \n"; $deleteProfileAttribute = new ET_ProfileAttribute(); $deleteProfileAttribute->authStub = $myclient; $deleteProfileAttribute->props = array("Name" => $NameOfAttribute, "PropertyType" => "string"); $deleteResponse = $deleteProfileAttribute->delete(); print_r('Delete Status: ' . ($deleteResponse->status ? 'true' : 'false') . "\n"); print 'Code: ' . $deleteResponse->code . "\n"; print 'Message: ' . $deleteResponse->message . "\n"; print 'Results Length: ' . count($deleteResponse->results) . "\n"; print 'Results: ' . "\n"; print_r($deleteResponse->results); print "\n---------------\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } ?>