Git Product home page Git Product logo

exacttarget's People

Contributors

brainbowler avatar davidcwhitfield avatar druid628 avatar rlweb avatar ryleysill93 avatar ryross avatar zikezhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

exacttarget's Issues

DataExtensionObject issues

I'm having trouble creating a DataExtensionObject. This is the code I'm using right now:

$result = $client->createDataExtensionObject(array(
            'CustomerKey' => $data_extension_key,
            'Properties' => $properties,
        ));

Where $properties is an array of EtAPIProperty objects.

In the PHP API Starter kit, and in this library, there are only two properties for EtDataExtensionObject (Name and Keys). When you look at the documentation (http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/adding_data_to_data_extension_object/ ), and the sample create dataextensionobject in the php api starter kit, only a CustomerKey and array of Properties are used.

Now, I don't know much about SOAP or ET, but I looked in the WSDL and saw that the DataExtensionObject "extends" ObjectExtension, and that ObjectExtension has a Properties property. And the ObjectExtension extends an APIObject that has a CustomerKey.

The problem when using this library to send a Create request is that it only sets properties that are explicitly defined https://github.com/druid628/exacttarget/blob/master/src/druid628/exactTarget/EtClient.php#L157

One thing we could do is make EtObjectExtension extend ETApiObject, and then make ETDataExtension extend EtObjectExtension. I think I'm going to do this in a fork. Let me know if you want me to make a PR for it.

Fix PSR-0 Compliance

ExactTargetClasses.php should be broken up and into individual files.
This creates an "issue" where the src/druid628/exactTarget/ directory will be then flooded with 200+ files. This is not a real issue it simply looks messy. Perhaps a restructure of classes is in order - this will require some code changes if restructuring and re-namespacing classes.

getDefinitionOfObject for DataExtensionObject fails

Hi there,

I'm running into a bit of an issue regarding DataExtensions again.

When I try to retrieve a DataExtensionObject with a specific filter, this library wants to find all properties of the object with the getDefinitionOfObject function ( https://github.com/druid628/exacttarget/blob/master/src/druid628/exactTarget/EtClient.php#L257 ) but ET doesn't return back an ObjectDefinition for DataExtensionObjects. So I get an error like "Undefined property: stdClass::$ObjectDefinition "

It is possible to get a list of properties available for the DataExtensionObject but we'd have to query for DataExtensionFields and filter based on CustomerKey ( http://salesforce.stackexchange.com/questions/22769/retrieving-all-column-names-from-a-dataextension ).

I tried to think of how this library could support retrieval of DataExtensionObjects and I came up with two options.

First is to create a new function on the EtClient that accepts a DataExtension CustomerKey and an array of filters. We could throw an exception when trying to retrieve a DataExtensionObject with recall() to alert the developer that that function is not supported for DEOs.

Second, is that we could move the getDefinitionofObjectRequest responsibility to the actual object classes. We'd have one base getDefinitionofObjectRequest and then extend it in each class that is necessary (which is just DEOs as of now). With this option, we'd either have to make that function a static function and then figure out how to pass in the CustomerKey for DEOs, or make it a regular function and then instantiate the class each time we need to get the ObjectDefinition.

I'd really like to use this library to retrieve DataExtensionObjects and I don't mind contributing code towards fixing this problem though I would like some guidance on how you'd prefer to structure the library around this change.

Thanks!

Also, getDefinitionofObjectRequest() is missing public, protected or private https://github.com/druid628/exacttarget/blob/master/src/druid628/exactTarget/EtClient.php#L257

recall not working at all,

Here is the example on wiki:

/ instantiates the Client for SOAP Communications
$client = new EtClient($userName,$password);

$subscriberInfo = array(
array(
"Name" => "SubscriberKey",
"Value" => "[email protected]",
"operator" => "equals",
),
array(
"Name" => "EmailAddress",
"Value" => "[email protected]",
"operator" => "equals",
),
);
$subscriber = $client->recallSubscriber($subscriberInfo);

unfortunately, it's not working at all.

Undefined property: stdClass::$ObjectDefinition

The error is from here:
https://github.com/druid628/exacttarget/blob/master/src/druid628/exactTarget/EtClient.php#L252

It happens when I try to use the recall method and the $properties parameter is NULL:
https://github.com/druid628/exacttarget/blob/master/src/druid628/exactTarget/EtClient.php#L208

There at least needs to be some kind of error-checking here. What am I doing wrong?

My code looks like this:

        $sfp = new EtSimpleFilterPart();
        $sfp->Property = "Name";
        $sfp->SimpleOperator = EtSimpleOperators::EQUALS;
        $sfp->Value = ['MyListName'];

        $results = $this->client->recallSendDefinitionList($sfp);

If I add the $properties array, the call works, but returns false:

        $sfp = new EtSimpleFilterPart();
        $sfp->Property = "Name";
        $sfp->SimpleOperator = EtSimpleOperators::EQUALS;
        $sfp->Value = ['MyListName'];

        $results = $this->client->recallSendDefinitionList($sfp, ['Name']);

Update php7.0 to php7.1

After the update from php 7.0 to 7.1. I get this error:
Function mcrypt_module_get_algo_key_size() is deprecated

Move 5.3 support to Legacy

PHP 5.3 will reach EOL in July 2014.

As of June 30, 2014, the druid628/exacttarget library will no longer officially support PHP 5.3. A legacy branch and composer alias will be created for use with PHP 5.3 but will no longer be receiving regular updates. Please be making preparations now to convert to 5.4 or switch to legacy branch or composer alias.

Thanks for your understanding.

-DruiD628

  1. http://php.net/releases/5_3_20.php
  2. http://php.net/archive/2013.php#id2013-07-11-1

Document style guide

ExactTarget library will comply with PSR-1/2 Standards. There will be some specifications where the PSR's leave some elements optional.

In short:

  • Spaces Not Tabs.
  • New line curly braces on classes and functions.
  • Same line curly brace on control structure

SoapFault: Server was unable to read request. ---> There is an error in the XML document. ---> Instance validation error: '' is not a valid value for SaveAction.

Hi , I want update attribute of subscribers.

    $client     = new EtClient($username,$password,'s7');
    $subscriber = new EtSubscriber($client);
    $subscriber->find($email);

        $times = new EtAttribute('times',1);
        $step  = new EtAttribute('Step' ,'2');

        $subscriber->updateAttribute($times);
        $subscriber->updateAttribute($step);
        //$subscriber->save();
        $client->updateSubscriber($subscriber, 'updateOnly');

The code above got error:

SoapFault: Server was unable to read request. ---> There is an error in the XML document. ---> Instance validation error: '' is not a valid value for SaveAction.

So, May I know how can I save $subscriber after updating attribute ?

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.