You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
I used an existing class as the base and the code in each of these is simple. I just look at the exacttarget_soap_client.php file and from that I can ascertain what needs to be modified.
The code in each of these is basically the same except for the object name and it looks like this:
// spl_autoload_register( function($class_name) {
// include_once 'src/'.$class_name.'.php';
// });
namespace FuelSdk;
/**
* ET_Query - Represents a query in a Marketing Cloud account.
*/
class ET_Query extends ET_CUDSupport
{
/**
* @var int Gets or sets the folder identifier.
*/
public $folderId;
/**
* Initializes a new instance of the class and will assign obj, folderProperty, folderMediaType property
*/
function __construct()
{
$this->obj = "QueryDefinition";
$this->folderProperty = "CategoryID";
$this->folderMediaType = "query";
}
}
So far it's been very easy to add new objects this way, but when I tried DeliveryProfile, it failed.
My code for that is the same except I changed class ET_DeliveryProfile extends ET_CUDSupport
to class ET_QueryDefinition extends ET_CUDSupport
and $this->obj = "QueryDefinition";
to $this->obj = "DeliveryProfile";
But this doesn't work, I get the following errors when I pass no properties:
Undefined property: stdClass::$ObjectDefinition in \vendor\salesforce-mc\fuel-sdk-php\src\ET_Info.php on line 34
Warning: First parameter must either be an object or the name of an existing class in \vendor\salesforce-mc\fuel-sdk-php\src\ET_Info.php on line 34
And if I try to pass one property like "Name" I get no errors, but 0 results back (which is not right because I have at least one DeliveryProfile).
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I am adding some of my own custom classes for objects that you don't have in the /src/ directory. For example, so far I've added:
ET_AccountUser
ET_Query
ET_SendClassification
ET_SenderProfile
I used an existing class as the base and the code in each of these is simple. I just look at the exacttarget_soap_client.php file and from that I can ascertain what needs to be modified.
The code in each of these is basically the same except for the object name and it looks like this:
So far it's been very easy to add new objects this way, but when I tried DeliveryProfile, it failed.
My code for that is the same except I changed
class ET_DeliveryProfile extends ET_CUDSupport
to
class ET_QueryDefinition extends ET_CUDSupport
and
$this->obj = "QueryDefinition";
to
$this->obj = "DeliveryProfile";
But this doesn't work, I get the following errors when I pass no properties:
Undefined property: stdClass::$ObjectDefinition in \vendor\salesforce-mc\fuel-sdk-php\src\ET_Info.php on line 34
Warning: First parameter must either be an object or the name of an existing class in \vendor\salesforce-mc\fuel-sdk-php\src\ET_Info.php on line 34
And if I try to pass one property like "Name" I get no errors, but 0 results back (which is not right because I have at least one DeliveryProfile).
The text was updated successfully, but these errors were encountered: