DigitalPianism_CampaignMonitor - Version 0.7.7

Version Notes

- Update the createsend library to fix the "include(Services/JSON.php): failed to open stream" error.

Download this release

Release Info

Developer Digital Pianism
Extension DigitalPianism_CampaignMonitor
Version 0.7.7
Comparing to
See all releases


Code changes from version 0.7.6 to 0.7.7

Files changed (97) hide show
  1. app/code/community/DigitalPianism/CampaignMonitor/etc/config.xml +1 -1
  2. lib/createsend/CONTRIBUTING.md +16 -0
  3. lib/createsend/HISTORY.md +110 -0
  4. lib/createsend/class/base_classes.php +2 -2
  5. lib/createsend/class/serialisation.php +1 -1
  6. lib/createsend/class/transport.php +12 -9
  7. lib/createsend/csrest_general.php +0 -17
  8. lib/createsend/csrest_segments.php +23 -11
  9. lib/createsend/samples/authentication/auth_with_api_key.php +19 -0
  10. lib/createsend/samples/authentication/auth_with_oauth.php +21 -0
  11. lib/createsend/samples/authentication/exchange_token.php +24 -0
  12. lib/createsend/samples/authentication/get_authorize_url.php +12 -0
  13. lib/createsend/samples/authentication/refresh_token.php +21 -0
  14. lib/createsend/samples/campaign/create.php +1 -1
  15. lib/createsend/samples/campaign/create_from_template.php +1 -1
  16. lib/createsend/samples/campaign/delete.php +1 -1
  17. lib/createsend/samples/campaign/get_bounces.php +1 -1
  18. lib/createsend/samples/campaign/get_clicks.php +1 -1
  19. lib/createsend/samples/campaign/get_email_client_usage.php +1 -1
  20. lib/createsend/samples/campaign/get_lists_and_segments.php +1 -1
  21. lib/createsend/samples/campaign/get_opens.php +1 -1
  22. lib/createsend/samples/campaign/get_recipients.php +1 -1
  23. lib/createsend/samples/campaign/get_spam.php +1 -1
  24. lib/createsend/samples/campaign/get_summary.php +1 -1
  25. lib/createsend/samples/campaign/get_unsubscribes.php +1 -1
  26. lib/createsend/samples/campaign/send.php +1 -1
  27. lib/createsend/samples/campaign/send_preview.php +1 -1
  28. lib/createsend/samples/campaign/unschedule.php +1 -1
  29. lib/createsend/samples/client/create.php +1 -1
  30. lib/createsend/samples/client/delete.php +1 -1
  31. lib/createsend/samples/client/get.php +1 -1
  32. lib/createsend/samples/client/get_campaigns.php +1 -1
  33. lib/createsend/samples/client/get_drafts.php +1 -1
  34. lib/createsend/samples/client/get_lists.php +1 -1
  35. lib/createsend/samples/client/get_lists_for_email.php +1 -1
  36. lib/createsend/samples/client/get_scheduled.php +1 -1
  37. lib/createsend/samples/client/get_segments.php +1 -1
  38. lib/createsend/samples/client/get_suppressionlist.php +1 -1
  39. lib/createsend/samples/client/get_templates.php +1 -1
  40. lib/createsend/samples/client/set_basics.php +1 -1
  41. lib/createsend/samples/client/set_monthly_billing.php +1 -1
  42. lib/createsend/samples/client/set_payg_billing.php +1 -1
  43. lib/createsend/samples/client/suppress.php +1 -1
  44. lib/createsend/samples/client/transfer_credits.php +1 -1
  45. lib/createsend/samples/client/unsuppress.php +1 -1
  46. lib/createsend/samples/external_session_url.php +27 -0
  47. lib/createsend/samples/get_apikey.php +1 -1
  48. lib/createsend/samples/get_billing_details.php +1 -1
  49. lib/createsend/samples/get_clients.php +1 -1
  50. lib/createsend/samples/get_countries.php +1 -1
  51. lib/createsend/samples/get_systemdate.php +1 -1
  52. lib/createsend/samples/get_timezones.php +1 -1
  53. lib/createsend/samples/list/activate_webhook.php +1 -1
  54. lib/createsend/samples/list/create.php +3 -3
  55. lib/createsend/samples/list/create_custom_field.php +1 -1
  56. lib/createsend/samples/list/create_webhook.php +1 -1
  57. lib/createsend/samples/list/deactivate_webhook.php +1 -1
  58. lib/createsend/samples/list/delete.php +1 -1
  59. lib/createsend/samples/list/delete_custom_field.php +1 -1
  60. lib/createsend/samples/list/delete_webhook.php +1 -1
  61. lib/createsend/samples/list/get.php +1 -1
  62. lib/createsend/samples/list/get_active_subscribers.php +1 -1
  63. lib/createsend/samples/list/get_bounced_subscribers.php +1 -1
  64. lib/createsend/samples/list/get_custom_fields.php +1 -1
  65. lib/createsend/samples/list/get_deleted_subscribers.php +1 -1
  66. lib/createsend/samples/list/get_segments.php +1 -1
  67. lib/createsend/samples/list/get_stats.php +1 -1
  68. lib/createsend/samples/list/get_unconfirmed_subscribers.php +1 -1
  69. lib/createsend/samples/list/get_unsubscribed_subscribers.php +1 -1
  70. lib/createsend/samples/list/get_webhooks.php +1 -1
  71. lib/createsend/samples/list/test_webhook.php +1 -1
  72. lib/createsend/samples/list/update.php +1 -1
  73. lib/createsend/samples/list/update_custom_field.php +1 -1
  74. lib/createsend/samples/list/update_field_options.php +1 -1
  75. lib/createsend/samples/segment/add_rule.php +8 -4
  76. lib/createsend/samples/segment/clear_rules.php +1 -1
  77. lib/createsend/samples/segment/create.php +18 -6
  78. lib/createsend/samples/segment/delete.php +1 -1
  79. lib/createsend/samples/segment/get.php +1 -1
  80. lib/createsend/samples/segment/get_subscribers.php +1 -1
  81. lib/createsend/samples/segment/update.php +14 -6
  82. lib/createsend/samples/subscriber/add.php +1 -1
  83. lib/createsend/samples/subscriber/delete.php +1 -1
  84. lib/createsend/samples/subscriber/get.php +1 -1
  85. lib/createsend/samples/subscriber/get_history.php +1 -1
  86. lib/createsend/samples/subscriber/import.php +3 -3
  87. lib/createsend/samples/subscriber/unsubscribe.php +1 -1
  88. lib/createsend/samples/subscriber/update.php +1 -1
  89. lib/createsend/samples/template/create.php +1 -1
  90. lib/createsend/samples/template/delete.php +1 -1
  91. lib/createsend/samples/template/get.php +1 -1
  92. lib/createsend/samples/template/update.php +1 -1
  93. lib/createsend/tests/csrest_segments_test.php +24 -12
  94. lib/createsend/tests/csrest_test.php +1 -24
  95. lib/createsend/tests/responses/oauth_exchange_token.json +5 -0
  96. lib/createsend/tests/responses/segment_details.json +10 -10
  97. package.xml +5 -7
app/code/community/DigitalPianism/CampaignMonitor/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
 
4
  <modules>
5
  <DigitalPianism_CampaignMonitor>
6
- <version>0.7.6</version>
7
  </DigitalPianism_CampaignMonitor>
8
  </modules>
9
 
3
 
4
  <modules>
5
  <DigitalPianism_CampaignMonitor>
6
+ <version>0.7.7</version>
7
  </DigitalPianism_CampaignMonitor>
8
  </modules>
9
 
lib/createsend/CONTRIBUTING.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Guidelines for contributing
2
+
3
+ 1. [Fork the repository](https://help.github.com/articles/fork-a-repo).
4
+ 2. [Create a topic branch](http://learn.github.com/p/branching.html).
5
+ 3. Make your changes, including tests for your changes.
6
+ 4. Ensure that all tests pass, by running:
7
+
8
+ ```
9
+ composer install --dev
10
+ cd tests && php all_tests.php && cd ..
11
+ ```
12
+
13
+ The [Travis CI build](https://travis-ci.org/campaignmonitor/createsend-php) runs on PHP `5.3` and `5.4`.
14
+
15
+ 5. It should go without saying, but do not increment the version number in your commits.
16
+ 6. [Submit a pull request](https://help.github.com/articles/using-pull-requests).
lib/createsend/HISTORY.md CHANGED
@@ -1,5 +1,115 @@
1
  # createsend-php history
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ## v3.1.0 - 15 Apr, 2013
4
 
5
  * Added support for [single sign on](http://www.campaignmonitor.com/api/account/#single_sign_on) which allows initiation of external login sessions to Campaign Monitor.
1
  # createsend-php history
2
 
3
+ ## v4.0.2 - 29 October, 2014
4
+
5
+ * Updated constant definitions so PHP Notices aren't raised
6
+
7
+ ## v4.0.1 - 30 May, 2014
8
+
9
+ * Updated the class_exists check to no longer call __autoload
10
+
11
+ ## v4.0.0 - 6 Feb, 2014
12
+
13
+ * Updated to v3.1 API
14
+ * Added support for new segments structure
15
+ * Segment now includes a new `RuleGroups` member, instead of a `Rules` member.
16
+
17
+ So for example, when you _previously_ would have created a segment like so:
18
+
19
+ ```php
20
+ $result = $wrap->create('Segments List ID', array(
21
+ 'Title' => 'Segment Title',
22
+ 'Rules' => array(
23
+ array(
24
+ 'Subject' => 'EmailAddress',
25
+ 'Clauses' => array(
26
+ 'CONTAINS example.com'
27
+ )
28
+ ) ,
29
+ array(
30
+ 'Subject' => '[customfield]',
31
+ 'Clauses' => array(
32
+ 'PROVIDED',
33
+ 'EQUALS 1'
34
+ )
35
+ )
36
+ )
37
+ ));
38
+ ```
39
+
40
+ You would _now_ do this:
41
+
42
+ ```php
43
+ $result = $wrap->create('Segments List ID', array(
44
+ 'Title' => 'Segment Title',
45
+ 'RuleGroups' => array(
46
+ array(
47
+ 'Rules' => array(
48
+ array(
49
+ 'RuleType' => 'EmailAddress',
50
+ 'Clause' => 'CONTAINS example.com'
51
+ )
52
+ )
53
+ ) ,
54
+ array(
55
+ 'Rules' => array(
56
+ array(
57
+ 'RuleType' => '[customfield]',
58
+ 'Clause' => 'PROVIDED'
59
+ ) ,
60
+ array(
61
+ 'RuleType' => '[customfield]',
62
+ 'Clause' => 'EQUALS 1'
63
+ )
64
+ )
65
+ )
66
+ )
67
+ ));
68
+ ```
69
+
70
+ * The Add Rule call is now Add Rule Group, taking a `ruleGroup` argument instead of a `rule` argument.
71
+
72
+ ```php
73
+ function CS_REST_Segments->add_rulegroup($rulegroup)
74
+ ```
75
+
76
+ So for example, when you _previously_ would have added a rule like so:
77
+
78
+ ```php
79
+ $wrap = new CS_REST_Segments('Segment ID', $auth);
80
+ $result = $wrap->add_rule(array(
81
+ 'Subject' => 'EmailAddress',
82
+ 'Clauses' => array('CONTAINS example.com')
83
+ ));
84
+ ```
85
+
86
+ You would _now_ do this:
87
+
88
+ ```php
89
+ $wrap = new CS_REST_Segments('Segment ID', $auth);
90
+ $result = $wrap->add_rulegroup(array(
91
+ 'Rules' => array(
92
+ array(
93
+ 'RuleType' => 'EmailAddress',
94
+ 'Clause' => 'CONTAINS example.com'
95
+ )
96
+ )
97
+ ));
98
+ ```
99
+ * Removed the get_apikey method to promote usage of oAuth authentication
100
+
101
+ ## v3.1.3 - 10 Dec, 2013
102
+
103
+ * Fixed a notice that was raised when unscheduling a campaign.
104
+
105
+ ## v3.1.2 - 28 Oct, 2013
106
+
107
+ * Only set the ```CURLOPT_CAINFO``` option if not already set globally via the ini system.
108
+
109
+ ## v3.1.1 - 3 Oct, 2013
110
+
111
+ * Made it harder to accidentally email your subscribers when using the example code
112
+
113
  ## v3.1.0 - 15 Apr, 2013
114
 
115
  * Added support for [single sign on](http://www.campaignmonitor.com/api/account/#single_sign_on) which allows initiation of external login sessions to Campaign Monitor.
lib/createsend/class/base_classes.php CHANGED
@@ -4,7 +4,7 @@ require_once dirname(__FILE__).'/serialisation.php';
4
  require_once dirname(__FILE__).'/transport.php';
5
  require_once dirname(__FILE__).'/log.php';
6
 
7
- define('CS_REST_WRAPPER_VERSION', '3.1.0');
8
  define('CS_HOST', 'api.createsend.com');
9
  define('CS_OAUTH_BASE_URI', 'https://'.CS_HOST.'/oauth');
10
  define('CS_OAUTH_TOKEN_URI', CS_OAUTH_BASE_URI.'/token');
@@ -144,7 +144,7 @@ class CS_REST_Wrapper_Base {
144
  $this->_log = is_null($log) ? new CS_REST_Log($debug_level) : $log;
145
 
146
  $this->_protocol = $protocol;
147
- $this->_base_route = $protocol.'://'.$host.'/api/v3/';
148
 
149
  $this->_log->log_message('Creating wrapper for '.$this->_base_route, get_class($this), CS_REST_LOG_VERBOSE);
150
 
4
  require_once dirname(__FILE__).'/transport.php';
5
  require_once dirname(__FILE__).'/log.php';
6
 
7
+ define('CS_REST_WRAPPER_VERSION', '4.0.2');
8
  define('CS_HOST', 'api.createsend.com');
9
  define('CS_OAUTH_BASE_URI', 'https://'.CS_HOST.'/oauth');
10
  define('CS_OAUTH_TOKEN_URI', CS_OAUTH_BASE_URI.'/token');
144
  $this->_log = is_null($log) ? new CS_REST_Log($debug_level) : $log;
145
 
146
  $this->_protocol = $protocol;
147
+ $this->_base_route = $protocol.'://'.$host.'/api/v3.1/';
148
 
149
  $this->_log->log_message('Creating wrapper for '.$this->_base_route, get_class($this), CS_REST_LOG_VERBOSE);
150
 
lib/createsend/class/serialisation.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if (!class_exists('Services_JSON')) {
4
  require_once dirname(__FILE__).'/services_json.php';
5
  }
6
 
1
  <?php
2
 
3
+ if (!class_exists('Services_JSON', false)) {
4
  require_once dirname(__FILE__).'/services_json.php';
5
  }
6
 
lib/createsend/class/transport.php CHANGED
@@ -4,8 +4,12 @@ define('CS_REST_GET', 'GET');
4
  define('CS_REST_POST', 'POST');
5
  define('CS_REST_PUT', 'PUT');
6
  define('CS_REST_DELETE', 'DELETE');
7
- define('CS_REST_SOCKET_TIMEOUT', 10);
8
- define('CS_REST_CALL_TIMEOUT', 10);
 
 
 
 
9
 
10
  function CS_REST_TRANSPORT_get_available($requires_ssl, $log) {
11
  if(function_exists('curl_init') && function_exists('curl_exec')) {
@@ -85,10 +89,6 @@ class CS_REST_CurlTransport extends CS_REST_BaseTransport {
85
  curl_setopt($ch, CURLOPT_URL, $call_options['route']);
86
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
87
  curl_setopt($ch, CURLOPT_HEADER, true);
88
- if (Mage::getStoreConfig('newsletter/campaignmonitor/proxy')){
89
- curl_setopt($ch, CURLOPT_PROXY, Mage::getStoreConfig('newsletter/campaignmonitor/proxy'));
90
- }
91
-
92
  $headers = array();
93
  $headers[] = 'Content-Type: '.$call_options['contentType'];
94
 
@@ -129,7 +129,10 @@ class CS_REST_CurlTransport extends CS_REST_BaseTransport {
129
  if($call_options['protocol'] === 'https') {
130
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
131
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
132
- curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__).'/cacert.pem');
 
 
 
133
  }
134
 
135
  switch($call_options['method']) {
@@ -140,7 +143,7 @@ class CS_REST_CurlTransport extends CS_REST_BaseTransport {
140
  break;
141
  case CS_REST_POST:
142
  curl_setopt($ch, CURLOPT_POST, true);
143
- curl_setopt($ch, CURLOPT_POSTFIELDS, $call_options['data']);
144
  break;
145
  case CS_REST_DELETE:
146
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, CS_REST_DELETE);
@@ -329,4 +332,4 @@ $call_options['data'];
329
 
330
  return $request."\n\n";
331
  }
332
- }
4
  define('CS_REST_POST', 'POST');
5
  define('CS_REST_PUT', 'PUT');
6
  define('CS_REST_DELETE', 'DELETE');
7
+ if (false === defined('CS_REST_SOCKET_TIMEOUT')) {
8
+ define('CS_REST_SOCKET_TIMEOUT', 10);
9
+ }
10
+ if (false === defined('CS_REST_CALL_TIMEOUT')) {
11
+ define('CS_REST_CALL_TIMEOUT', 10);
12
+ }
13
 
14
  function CS_REST_TRANSPORT_get_available($requires_ssl, $log) {
15
  if(function_exists('curl_init') && function_exists('curl_exec')) {
89
  curl_setopt($ch, CURLOPT_URL, $call_options['route']);
90
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
91
  curl_setopt($ch, CURLOPT_HEADER, true);
 
 
 
 
92
  $headers = array();
93
  $headers[] = 'Content-Type: '.$call_options['contentType'];
94
 
129
  if($call_options['protocol'] === 'https') {
130
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
131
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
132
+
133
+ if(strlen(ini_get('curl.cainfo')) === 0) {
134
+ curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__).'/cacert.pem');
135
+ }
136
  }
137
 
138
  switch($call_options['method']) {
143
  break;
144
  case CS_REST_POST:
145
  curl_setopt($ch, CURLOPT_POST, true);
146
+ curl_setopt($ch, CURLOPT_POSTFIELDS, isset($call_options['data']) ? $call_options['data'] : '');
147
  break;
148
  case CS_REST_DELETE:
149
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, CS_REST_DELETE);
332
 
333
  return $request."\n\n";
334
  }
335
+ }
lib/createsend/csrest_general.php CHANGED
@@ -128,23 +128,6 @@ class CS_REST_General extends CS_REST_Wrapper_Base {
128
  return $this->get_request($this->_base_route.'countries.json');
129
  }
130
 
131
- /**
132
- * Gets your API key
133
- * @param string $username Your username
134
- * @param string $password Your password
135
- * @param string $site_url The url you use to login from
136
- * @access public
137
- * @return CS_REST_Wrapper_Result A successful response will be an object of the form
138
- * {
139
- * 'ApiKey' => string Your api key
140
- * }
141
- */
142
- function get_apikey($username, $password, $site_url) {
143
- return $this->get_request($this->_base_route.'apikey.json?siteurl='.$site_url,
144
- array('authdetails' => array('username' => $username, 'password' => $password))
145
- );
146
- }
147
-
148
  /**
149
  * Gets an array of clients
150
  * @access public
128
  return $this->get_request($this->_base_route.'countries.json');
129
  }
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  /**
132
  * Gets an array of clients
133
  * @access public
lib/createsend/csrest_segments.php CHANGED
@@ -67,10 +67,14 @@ class CS_REST_Segments extends CS_REST_Wrapper_Base {
67
  * This should be an array of the form
68
  * array(
69
  * 'Title' => The title of the new segment
70
- * 'Rules' => array(
71
  * array(
72
- * 'Subject' => The subject of this rule
73
- * 'Clauses' => array<string> The specific clauses for this rule
 
 
 
 
74
  * )
75
  * )
76
  * )
@@ -85,11 +89,15 @@ class CS_REST_Segments extends CS_REST_Wrapper_Base {
85
  * @param $segment_details The new details for the segment
86
  * This should be an array of the form
87
  * array(
88
- * 'Title' => The new title for the segment
89
- * 'Rules' => array(
90
  * array(
91
- * 'Subject' => The subject of this rule
92
- * 'Clauses' => array<string> The specific clauses for this rule
 
 
 
 
93
  * )
94
  * )
95
  * )
@@ -104,13 +112,17 @@ class CS_REST_Segments extends CS_REST_Wrapper_Base {
104
  * @param $rule The rule to add to the segment
105
  * This should be an array of the form
106
  * array(
107
- * 'Subject' => The subject of this rule
108
- * 'Clauses' => array<string> The specific clauses for this rule
 
 
 
 
109
  * )
110
  * @return CS_REST_Wrapper_Result A successful response will be empty
111
  */
112
- function add_rule($rule) {
113
- return $this->post_request($this->_segments_base_route.'/rules.json', $rule);
114
  }
115
 
116
  /**
67
  * This should be an array of the form
68
  * array(
69
  * 'Title' => The title of the new segment
70
+ * 'RuleGroups' => array(
71
  * array(
72
+ * 'Rules' => array(
73
+ * array(
74
+ * 'RuleType' => The subject of this rule
75
+ * 'Clause' => The specific clauses for this rule
76
+ * )
77
+ * )
78
  * )
79
  * )
80
  * )
89
  * @param $segment_details The new details for the segment
90
  * This should be an array of the form
91
  * array(
92
+ * 'Title' => The title of the new segment
93
+ * 'RuleGroups' => array(
94
  * array(
95
+ * 'Rules' => array(
96
+ * array(
97
+ * 'RuleType' => The subject of this rule
98
+ * 'Clause' => The specific clauses for this rule
99
+ * )
100
+ * )
101
  * )
102
  * )
103
  * )
112
  * @param $rule The rule to add to the segment
113
  * This should be an array of the form
114
  * array(
115
+ * 'Rules' => array(
116
+ * array(
117
+ * 'RuleType' => The subject of this rule
118
+ * 'Clause' => The specific clauses for this rule
119
+ * )
120
+ * )
121
  * )
122
  * @return CS_REST_Wrapper_Result A successful response will be empty
123
  */
124
+ function add_rulegroup($rulegroup) {
125
+ return $this->post_request($this->_segments_base_route.'/rules.json', $rulegroup);
126
  }
127
 
128
  /**
lib/createsend/samples/authentication/auth_with_api_key.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once '../../csrest_general.php';
4
+
5
+ $auth = array('api_key' => 'your api key');
6
+ $wrap = new CS_REST_General($auth);
7
+
8
+ $result = $wrap->get_clients();
9
+
10
+
11
+ echo "Result of /api/v3.1/clients\n<br />";
12
+ if($result->was_successful()) {
13
+ echo "Got clients\n<br /><pre>";
14
+ var_dump($result->response);
15
+ } else {
16
+ echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
17
+ var_dump($result->response);
18
+ }
19
+ echo '</pre>';
lib/createsend/samples/authentication/auth_with_oauth.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once '../../csrest_general.php';
4
+
5
+ $auth = array(
6
+ 'access_token' => 'your access token',
7
+ 'refresh_token' => 'your refresh token');
8
+ $wrap = new CS_REST_General($auth);
9
+
10
+ $result = $wrap->get_clients();
11
+
12
+
13
+ echo "Result of /api/v3.1/clients\n<br />";
14
+ if($result->was_successful()) {
15
+ echo "Got clients\n<br /><pre>";
16
+ var_dump($result->response);
17
+ } else {
18
+ echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
19
+ var_dump($result->response);
20
+ }
21
+ echo '</pre>';
lib/createsend/samples/authentication/exchange_token.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once '../../csrest_general.php';
4
+
5
+ $client_id = 8998879;
6
+ $client_secret = 'iou0q9wud0q9wd0q9wid0q9iwd0q9wid0q9wdqwd';
7
+ $redirect_uri = 'http://example.com/auth';
8
+ $code = 'd92id09iwdwqw';
9
+
10
+ $result = CS_REST_General::exchange_token($client_id, $client_secret, $redirect_uri, $code);
11
+
12
+ if($result->was_successful()) {
13
+ $access_token = $result->response->access_token;
14
+ $expires_in = $result->response->expires_in;
15
+ $refresh_token = $result->response->refresh_token;
16
+ # Save $access_token, $expires_in, and $refresh_token.
17
+ echo "access token: ".$access_token."\n";
18
+ echo "expires in (seconds): ".$expires_in."\n";
19
+ echo "refresh token: ".$refresh_token."\n";
20
+ } else {
21
+ echo 'An error occurred:\n';
22
+ echo $result->response->error.': '.$result->response->error_description."\n";
23
+ # Handle error...
24
+ }
lib/createsend/samples/authentication/get_authorize_url.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once '../../csrest_general.php';
4
+
5
+ $client_id = 8998879;
6
+ $redirect_uri = 'http://example.com/auth';
7
+ $scope = 'ViewReports,CreateCampaigns,SendCampaigns';
8
+ $state = 'some state data';
9
+
10
+ $authorize_url = CS_REST_General::authorize_url($client_id, $redirect_uri, $scope, $state);
11
+
12
+ echo "Redirect your users to: ".$authorize_url."\n<br />";
lib/createsend/samples/authentication/refresh_token.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once '../../csrest_general.php';
4
+
5
+ $auth = array(
6
+ 'access_token' => 'your access token',
7
+ 'refresh_token' => 'your refresh token'
8
+ );
9
+ $wrap = new CS_REST_General($auth);
10
+ $result = $wrap->get_clients();
11
+ if (!$result->was_successful()) {
12
+ # If you receive '121: Expired OAuth Token', refresh the access token
13
+ if ($result->response->Code == 121) {
14
+ list($new_access_token, $new_expires_in, $new_refresh_token) =
15
+ $wrap->refresh_token();
16
+ # Save $new_access_token, $new_expires_in, and $new_refresh_token
17
+ }
18
+ # Make the call again
19
+ $result = $wrap->get_clients();
20
+ }
21
+ var_dump($result->response);
lib/createsend/samples/campaign/create.php CHANGED
@@ -19,7 +19,7 @@ $result = $wrap->create('Campaigns Client ID', array(
19
  'SegmentIDs' => array('First Segment', 'Second Segment')
20
  ));
21
 
22
- echo "Result of POST /api/v3/campaigns/{clientID}\n<br />";
23
  if($result->was_successful()) {
24
  echo "Created with ID\n<br />".$result->response;
25
  } else {
19
  'SegmentIDs' => array('First Segment', 'Second Segment')
20
  ));
21
 
22
+ echo "Result of POST /api/v3.1/campaigns/{clientID}\n<br />";
23
  if($result->was_successful()) {
24
  echo "Created with ID\n<br />".$result->response;
25
  } else {
lib/createsend/samples/campaign/create_from_template.php CHANGED
@@ -89,7 +89,7 @@ $result = $wrap->create_from_template('Campaigns Client ID', array(
89
  'TemplateContent' => $template_content
90
  ));
91
 
92
- echo "Result of POST /api/v3/campaigns/{clientID}/fromtemplate\n<br />";
93
  if($result->was_successful()) {
94
  echo "Created with ID\n<br />".$result->response;
95
  } else {
89
  'TemplateContent' => $template_content
90
  ));
91
 
92
+ echo "Result of POST /api/v3.1/campaigns/{clientID}/fromtemplate\n<br />";
93
  if($result->was_successful()) {
94
  echo "Created with ID\n<br />".$result->response;
95
  } else {
lib/createsend/samples/campaign/delete.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Campaigns('Campaign ID to Delete', $auth);
9
  $result = $wrap->delete();
10
 
11
- echo "Result of DELETE /api/v3/campaigns/{id}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Deleted with code\n<br />".$result->http_status_code;
14
  } else {
8
  $wrap = new CS_REST_Campaigns('Campaign ID to Delete', $auth);
9
  $result = $wrap->delete();
10
 
11
+ echo "Result of DELETE /api/v3.1/campaigns/{id}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Deleted with code\n<br />".$result->http_status_code;
14
  } else {
lib/createsend/samples/campaign/get_bounces.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Campaigns('Campaign ID to get bounces for', $auth);
9
  $result = $wrap->get_bounces('Get bounces since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_bounces(page, page size, order field, order direction);
11
 
12
- echo "Result of GET /api/v3/campaigns/{id}/bounces\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got bounces\n<br /><pre>";
15
  var_dump($result->response);
9
  $result = $wrap->get_bounces('Get bounces since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_bounces(page, page size, order field, order direction);
11
 
12
+ echo "Result of GET /api/v3.1/campaigns/{id}/bounces\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got bounces\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/campaign/get_clicks.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Campaigns('Campaign ID to get clicks for', $auth);
9
  $result = $wrap->get_clicks('Get clicks since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_clicks(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
- echo "Result of GET /api/v3/campaigns/{id}/clicks\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got clicks\n<br /><pre>";
15
  var_dump($result->response);
9
  $result = $wrap->get_clicks('Get clicks since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_clicks(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
+ echo "Result of GET /api/v3.1/campaigns/{id}/clicks\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got clicks\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/campaign/get_email_client_usage.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Campaigns('Campaign ID to get the email client usage for', $auth);
9
  $result = $wrap->get_email_client_usage();
10
 
11
- echo "Result of GET /api/v3/campaigns/{id}/emailclientusage\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got email client usage\n<br /><pre>";
14
  var_dump($result->response);
8
  $wrap = new CS_REST_Campaigns('Campaign ID to get the email client usage for', $auth);
9
  $result = $wrap->get_email_client_usage();
10
 
11
+ echo "Result of GET /api/v3.1/campaigns/{id}/emailclientusage\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got email client usage\n<br /><pre>";
14
  var_dump($result->response);
lib/createsend/samples/campaign/get_lists_and_segments.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Campaigns('Campaign ID to get lists for', $auth);
9
  $result = $wrap->get_lists_and_segments();
10
 
11
- echo "Result of GET /api/v3/campaigns/{id}/listsandsegments\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got lists and segments\n<br /><pre>";
14
  var_dump($result->response);
8
  $wrap = new CS_REST_Campaigns('Campaign ID to get lists for', $auth);
9
  $result = $wrap->get_lists_and_segments();
10
 
11
+ echo "Result of GET /api/v3.1/campaigns/{id}/listsandsegments\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got lists and segments\n<br /><pre>";
14
  var_dump($result->response);
lib/createsend/samples/campaign/get_opens.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Campaigns('Campaign ID to get opens for', $auth);
9
  $result = $wrap->get_opens('Get opens since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_opens(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
- echo "Result of GET /api/v3/campaigns/{id}/opens\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got opens\n<br /><pre>";
15
  var_dump($result->response);
9
  $result = $wrap->get_opens('Get opens since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_opens(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
+ echo "Result of GET /api/v3.1/campaigns/{id}/opens\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got opens\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/campaign/get_recipients.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Campaigns('Campaign ID to get recipients for', $auth);
9
  $result = $wrap->get_recipients(1, 50, 'email', 'asc');
10
  //$result = $wrap->get_recipients(page number, page size, order by, order direction);
11
 
12
- echo "Result of GET /api/v3/campaigns/{id}/recipients\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got recipients\n<br /><pre>";
15
  var_dump($result->response);
9
  $result = $wrap->get_recipients(1, 50, 'email', 'asc');
10
  //$result = $wrap->get_recipients(page number, page size, order by, order direction);
11
 
12
+ echo "Result of GET /api/v3.1/campaigns/{id}/recipients\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got recipients\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/campaign/get_spam.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Campaigns('Campaign ID to get spam complaints for', $auth);
9
  $result = $wrap->get_spam('Get spam complaints since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_spam(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
- echo "Result of GET /api/v3/campaigns/{id}/spam\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got spam complaints\n<br /><pre>";
15
  var_dump($result->response);
9
  $result = $wrap->get_spam('Get spam complaints since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_spam(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
+ echo "Result of GET /api/v3.1/campaigns/{id}/spam\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got spam complaints\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/campaign/get_summary.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Campaigns('Campaign ID to get the summary of', $auth);
9
  $result = $wrap->get_summary();
10
 
11
- echo "Result of GET /api/v3/campaigns/{id}/summary\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got summary\n<br /><pre>";
14
  var_dump($result->response);
8
  $wrap = new CS_REST_Campaigns('Campaign ID to get the summary of', $auth);
9
  $result = $wrap->get_summary();
10
 
11
+ echo "Result of GET /api/v3.1/campaigns/{id}/summary\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got summary\n<br /><pre>";
14
  var_dump($result->response);
lib/createsend/samples/campaign/get_unsubscribes.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Campaigns('Campaign ID to get unsubscribes for', $auth);
9
  $result = $wrap->get_unsubscribes('Get unsubscribes since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_unsubscribes(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
- echo "Result of GET /api/v3/campaigns/{id}/unsubscribes\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got unsubscribes\n<br /><pre>";
15
  var_dump($result->response);
9
  $result = $wrap->get_unsubscribes('Get unsubscribes since', 1, 50, 'email', 'asc');
10
  //$result = $wrap->get_unsubscribes(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);
11
 
12
+ echo "Result of GET /api/v3.1/campaigns/{id}/unsubscribes\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got unsubscribes\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/campaign/send.php CHANGED
@@ -12,7 +12,7 @@ $result = $wrap->send(array(
12
  'SendDate' => 'Date to send (yyyy-mm-dd or immediately)'
13
  ));
14
 
15
- echo "Result of POST /api/v3/campaigns/{id}/send\n<br />";
16
  if($result->was_successful()) {
17
  echo "Scheduled with code\n<br />".$result->http_status_code;
18
  } else {
12
  'SendDate' => 'Date to send (yyyy-mm-dd or immediately)'
13
  ));
14
 
15
+ echo "Result of POST /api/v3.1/campaigns/{id}/send\n<br />";
16
  if($result->was_successful()) {
17
  echo "Scheduled with code\n<br />".$result->http_status_code;
18
  } else {
lib/createsend/samples/campaign/send_preview.php CHANGED
@@ -11,7 +11,7 @@ $result = $wrap->send_preview(array(
11
  'test2@test.com'
12
  ), 'Fallback');
13
 
14
- echo "Result of POST /api/v3/campaigns/{id}/sendpreview\n<br />";
15
  if($result->was_successful()) {
16
  echo "Preview sent with code\n<br />".$result->http_status_code;
17
  } else {
11
  'test2@test.com'
12
  ), 'Fallback');
13
 
14
+ echo "Result of POST /api/v3.1/campaigns/{id}/sendpreview\n<br />";
15
  if($result->was_successful()) {
16
  echo "Preview sent with code\n<br />".$result->http_status_code;
17
  } else {
lib/createsend/samples/campaign/unschedule.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Campaigns('Campaign ID to unschedule', $auth);
9
 
10
  $result = $wrap->unschedule();
11
 
12
- echo "Result of POST /api/v3/campaigns/{id}/unschedule\n<br />";
13
  if($result->was_successful()) {
14
  echo "Scheduled with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->unschedule();
11
 
12
+ echo "Result of POST /api/v3.1/campaigns/{id}/unschedule\n<br />";
13
  if($result->was_successful()) {
14
  echo "Scheduled with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/client/create.php CHANGED
@@ -13,7 +13,7 @@ $result = $wrap->create(array(
13
  'Timezone' => 'Clients timezone'
14
  ));
15
 
16
- echo "Result of POST /api/v3/clients\n<br />";
17
  if($result->was_successful()) {
18
  echo "Created with ID\n<br />".$result->response;
19
  } else {
13
  'Timezone' => 'Clients timezone'
14
  ));
15
 
16
+ echo "Result of POST /api/v3.1/clients\n<br />";
17
  if($result->was_successful()) {
18
  echo "Created with ID\n<br />".$result->response;
19
  } else {
lib/createsend/samples/client/delete.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Clients('Client ID to Delete', $auth);
9
 
10
  $result = $wrap->delete();
11
 
12
- echo "Result of DELETE /api/v3/clients/{id}\n<br />";
13
  if($result->was_successful()) {
14
  echo 'Deleted';
15
  } else {
9
 
10
  $result = $wrap->delete();
11
 
12
+ echo "Result of DELETE /api/v3.1/clients/{id}\n<br />";
13
  if($result->was_successful()) {
14
  echo 'Deleted';
15
  } else {
lib/createsend/samples/client/get.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Clients('Your client ID', $auth);
9
  $result = $wrap->get();
10
 
11
- echo "Result of GET /api/v3/clients/{id}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got client <pre>";
14
  var_dump($result->response);
8
  $wrap = new CS_REST_Clients('Your client ID', $auth);
9
  $result = $wrap->get();
10
 
11
+ echo "Result of GET /api/v3.1/clients/{id}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got client <pre>";
14
  var_dump($result->response);
lib/createsend/samples/client/get_campaigns.php CHANGED
@@ -11,7 +11,7 @@ $wrap = new CS_REST_Clients(
11
 
12
  $result = $wrap->get_campaigns();
13
 
14
- echo "Result of /api/v3/clients/{id}/campaigns\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got campaigns\n<br /><pre>";
17
  var_dump($result->response);
11
 
12
  $result = $wrap->get_campaigns();
13
 
14
+ echo "Result of /api/v3.1/clients/{id}/campaigns\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got campaigns\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/client/get_drafts.php CHANGED
@@ -11,7 +11,7 @@ $wrap = new CS_REST_Clients(
11
 
12
  $result = $wrap->get_drafts();
13
 
14
- echo "Result of /api/v3/clients/{id}/drafts\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got drafts\n<br /><pre>";
17
  var_dump($result->response);
11
 
12
  $result = $wrap->get_drafts();
13
 
14
+ echo "Result of /api/v3.1/clients/{id}/drafts\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got drafts\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/client/get_lists.php CHANGED
@@ -11,7 +11,7 @@ $wrap = new CS_REST_Clients(
11
 
12
  $result = $wrap->get_lists();
13
 
14
- echo "Result of /api/v3/clients/{id}/lists\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got lists\n<br /><pre>";
17
  var_dump($result->response);
11
 
12
  $result = $wrap->get_lists();
13
 
14
+ echo "Result of /api/v3.1/clients/{id}/lists\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got lists\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/client/get_lists_for_email.php CHANGED
@@ -13,7 +13,7 @@ $email_address = 'your_email_address@example.com';
13
 
14
  $result = $wrap->get_lists_for_email($email_address);
15
 
16
- echo "Result of /api/v3/clients/{id}/listsforemail\n<br />";
17
  if($result->was_successful()) {
18
  echo "Got lists to which email address ".$email_address." is subscribed\n<br /><pre>";
19
  var_dump($result->response);
13
 
14
  $result = $wrap->get_lists_for_email($email_address);
15
 
16
+ echo "Result of /api/v3.1/clients/{id}/listsforemail\n<br />";
17
  if($result->was_successful()) {
18
  echo "Got lists to which email address ".$email_address." is subscribed\n<br /><pre>";
19
  var_dump($result->response);
lib/createsend/samples/client/get_scheduled.php CHANGED
@@ -11,7 +11,7 @@ $wrap = new CS_REST_Clients(
11
 
12
  $result = $wrap->get_scheduled();
13
 
14
- echo "Result of /api/v3/clients/{id}/scheduled\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got scheduled campaigns\n<br /><pre>";
17
  var_dump($result->response);
11
 
12
  $result = $wrap->get_scheduled();
13
 
14
+ echo "Result of /api/v3.1/clients/{id}/scheduled\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got scheduled campaigns\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/client/get_segments.php CHANGED
@@ -11,7 +11,7 @@ $wrap = new CS_REST_Clients(
11
 
12
  $result = $wrap->get_segments();
13
 
14
- echo "Result of /api/v3/clients/{id}/segments\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got segments\n<br /><pre>";
17
  var_dump($result->response);
11
 
12
  $result = $wrap->get_segments();
13
 
14
+ echo "Result of /api/v3.1/clients/{id}/segments\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got segments\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/client/get_suppressionlist.php CHANGED
@@ -12,7 +12,7 @@ $wrap = new CS_REST_Clients(
12
  $result = $wrap->get_suppressionlist(1, 50, 'email', 'asc');
13
  //$result = $wrap->get_suppressionlist(page number, page size, order by, order direction);
14
 
15
- echo "Result of /api/v3/clients/{id}/suppressionlist\n<br />";
16
  if($result->was_successful()) {
17
  echo "Got suppression list\n<br /><pre>";
18
  var_dump($result->response);
12
  $result = $wrap->get_suppressionlist(1, 50, 'email', 'asc');
13
  //$result = $wrap->get_suppressionlist(page number, page size, order by, order direction);
14
 
15
+ echo "Result of /api/v3.1/clients/{id}/suppressionlist\n<br />";
16
  if($result->was_successful()) {
17
  echo "Got suppression list\n<br /><pre>";
18
  var_dump($result->response);
lib/createsend/samples/client/get_templates.php CHANGED
@@ -11,7 +11,7 @@ $wrap = new CS_REST_Clients(
11
 
12
  $result = $wrap->get_templates();
13
 
14
- echo "Result of /api/v3/clients/{id}/templates\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got templates\n<br /><pre>";
17
  var_dump($result->response);
11
 
12
  $result = $wrap->get_templates();
13
 
14
+ echo "Result of /api/v3.1/clients/{id}/templates\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got templates\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/client/set_basics.php CHANGED
@@ -13,7 +13,7 @@ $result = $wrap->set_basics(array(
13
  'Timezone' => 'Clients timezone'
14
  ));
15
 
16
- echo "Result of PUT /api/v3/clients/{id}/setbasics\n<br />";
17
  if($result->was_successful()) {
18
  echo "Updated with Code ".$result->http_status_code;
19
  } else {
13
  'Timezone' => 'Clients timezone'
14
  ));
15
 
16
+ echo "Result of PUT /api/v3.1/clients/{id}/setbasics\n<br />";
17
  if($result->was_successful()) {
18
  echo "Updated with Code ".$result->http_status_code;
19
  } else {
lib/createsend/samples/client/set_monthly_billing.php CHANGED
@@ -14,7 +14,7 @@ $result = $wrap->set_monthly_billing(array(
14
  'MonthlyScheme' => 'Basic' */
15
  ));
16
 
17
- echo "Result of PUT /api/v3/clients/{id}/setmonthlybilling\n<br />";
18
  if($result->was_successful()) {
19
  echo "Updated with Code ".$result->http_status_code;
20
  } else {
14
  'MonthlyScheme' => 'Basic' */
15
  ));
16
 
17
+ echo "Result of PUT /api/v3.1/clients/{id}/setmonthlybilling\n<br />";
18
  if($result->was_successful()) {
19
  echo "Updated with Code ".$result->http_status_code;
20
  } else {
lib/createsend/samples/client/set_payg_billing.php CHANGED
@@ -26,7 +26,7 @@ $result = $wrap->set_payg_billing(array(
26
  'MarkupOnDesignSpamTest' => 7 */
27
  ));
28
 
29
- echo "Result of PUT /api/v3/clients/{id}/setpaygbilling\n<br />";
30
  if($result->was_successful()) {
31
  echo "Updated with Code ".$result->http_status_code;
32
  } else {
26
  'MarkupOnDesignSpamTest' => 7 */
27
  ));
28
 
29
+ echo "Result of PUT /api/v3.1/clients/{id}/setpaygbilling\n<br />";
30
  if($result->was_successful()) {
31
  echo "Updated with Code ".$result->http_status_code;
32
  } else {
lib/createsend/samples/client/suppress.php CHANGED
@@ -14,7 +14,7 @@ $emails = array(
14
 
15
  $result = $wrap->suppress($emails);
16
 
17
- echo "Result of PUT /api/v3/clients/{id}/suppress\n<br />";
18
  if($result->was_successful()) {
19
  echo "Updated with Code ".$result->http_status_code;
20
  } else {
14
 
15
  $result = $wrap->suppress($emails);
16
 
17
+ echo "Result of PUT /api/v3.1/clients/{id}/suppress\n<br />";
18
  if($result->was_successful()) {
19
  echo "Updated with Code ".$result->http_status_code;
20
  } else {
lib/createsend/samples/client/transfer_credits.php CHANGED
@@ -14,7 +14,7 @@ $transfer_details = array(
14
 
15
  $result = $wrap->transfer_credits($transfer_details);
16
 
17
- echo "Result of POST /api/v3/clients/{id}/credits\n<br />";
18
  if($result->was_successful()) {
19
  echo "Transferred with response\n<br /><pre>";
20
  var_dump($result->response);
14
 
15
  $result = $wrap->transfer_credits($transfer_details);
16
 
17
+ echo "Result of POST /api/v3.1/clients/{id}/credits\n<br />";
18
  if($result->was_successful()) {
19
  echo "Transferred with response\n<br /><pre>";
20
  var_dump($result->response);
lib/createsend/samples/client/unsuppress.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Clients('Your client ID', $auth);
9
 
10
  $result = $wrap->unsuppress('Email address to unsuppress');
11
 
12
- echo "Result of PUT /api/v3/clients/{id}/unsuppress\n<br />";
13
  if($result->was_successful()) {
14
  echo "Updated with Code ".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->unsuppress('Email address to unsuppress');
11
 
12
+ echo "Result of PUT /api/v3.1/clients/{id}/unsuppress\n<br />";
13
  if($result->was_successful()) {
14
  echo "Updated with Code ".$result->http_status_code;
15
  } else {
lib/createsend/samples/external_session_url.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once '../csrest_general.php';
4
+
5
+ $auth = array(
6
+ 'access_token' => 'your access token',
7
+ 'refresh_token' => 'your refresh token');
8
+ $wrap = new CS_REST_General($auth);
9
+
10
+ $result = $wrap->external_session_url(array(
11
+ 'Email' => 'The email address of the Campaign Monitor user for whom the login session should be created',
12
+ 'Chrome' => 'Which chrome to display - Must be either "all", "tabs", or "none"',
13
+ 'Url' => 'The URL to display once logged in. e.g. "/subscribers/"',
14
+ 'IntegratorID' => 'The Integrator ID. You need to contact Campaign Monitor support to get an Integrator ID.',
15
+ 'ClientID' => 'The Client ID of the client which should be active once logged in to the Campaign Monitor account.'
16
+ ));
17
+
18
+ echo "Result of PUT /api/v3.1/externalsession\n<br />";
19
+ if($result->was_successful()) {
20
+ echo "Succeeded with Code ".$result->http_status_code."\n<br /><pre>";
21
+ var_dump($result->response);
22
+ echo '</pre>';
23
+ } else {
24
+ echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
25
+ var_dump($result->response);
26
+ echo '</pre>';
27
+ }
lib/createsend/samples/get_apikey.php CHANGED
@@ -6,7 +6,7 @@ $wrap = new CS_REST_General(NULL);
6
 
7
  $result = $wrap->get_apikey('Your username', 'Your password', 'account.test.createsend.com');
8
 
9
- echo "Result of /api/v3/apikey\n<br />";
10
  if($result->was_successful()) {
11
  echo "Got API Key\n<br />".$result->response->ApiKey;
12
  } else {
6
 
7
  $result = $wrap->get_apikey('Your username', 'Your password', 'account.test.createsend.com');
8
 
9
+ echo "Result of /api/v3.1/apikey\n<br />";
10
  if($result->was_successful()) {
11
  echo "Got API Key\n<br />".$result->response->ApiKey;
12
  } else {
lib/createsend/samples/get_billing_details.php CHANGED
@@ -10,7 +10,7 @@ $wrap = new CS_REST_General($auth);
10
 
11
  $result = $wrap->get_billing_details();
12
 
13
- echo "Result of /api/v3/billingdetails\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got billing details\n<br /><pre>";
16
  var_dump($result->response);
10
 
11
  $result = $wrap->get_billing_details();
12
 
13
+ echo "Result of /api/v3.1/billingdetails\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got billing details\n<br /><pre>";
16
  var_dump($result->response);
lib/createsend/samples/get_clients.php CHANGED
@@ -11,7 +11,7 @@ $wrap = new CS_REST_General($auth);
11
  $result = $wrap->get_clients();
12
 
13
 
14
- echo "Result of /api/v3/clients\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got clients\n<br /><pre>";
17
  var_dump($result->response);
11
  $result = $wrap->get_clients();
12
 
13
 
14
+ echo "Result of /api/v3.1/clients\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got clients\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/get_countries.php CHANGED
@@ -10,7 +10,7 @@ $wrap = new CS_REST_General($auth);
10
 
11
  $result = $wrap->get_countries();
12
 
13
- echo "Result of /api/v3/countries\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got countries\n<br /><pre>";
16
  var_dump($result->response);
10
 
11
  $result = $wrap->get_countries();
12
 
13
+ echo "Result of /api/v3.1/countries\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got countries\n<br /><pre>";
16
  var_dump($result->response);
lib/createsend/samples/get_systemdate.php CHANGED
@@ -10,7 +10,7 @@ $wrap = new CS_REST_General($auth);
10
 
11
  $result = $wrap->get_systemdate();
12
 
13
- echo "Result of /api/v3/systemdate\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got system date\n<br />".$result->response->SystemDate;
16
  } else {
10
 
11
  $result = $wrap->get_systemdate();
12
 
13
+ echo "Result of /api/v3.1/systemdate\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got system date\n<br />".$result->response->SystemDate;
16
  } else {
lib/createsend/samples/get_timezones.php CHANGED
@@ -10,7 +10,7 @@ $wrap = new CS_REST_General($auth);
10
 
11
  $result = $wrap->get_timezones();
12
 
13
- echo "Result of /api/v3/timezones\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got timezones\n<br /><pre>";
16
  var_dump($result->response);
10
 
11
  $result = $wrap->get_timezones();
12
 
13
+ echo "Result of /api/v3.1/timezones\n<br />";
14
  if($result->was_successful()) {
15
  echo "Got timezones\n<br /><pre>";
16
  var_dump($result->response);
lib/createsend/samples/list/activate_webhook.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->activate_webhook('Webhook ID');
11
 
12
- echo "Result of PUT /api/v3/lists/{ID}/webhooks/{WHID}/activate\n<br />";
13
  if($result->was_successful()) {
14
  echo "Activated with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->activate_webhook('Webhook ID');
11
 
12
+ echo "Result of PUT /api/v3.1/lists/{ID}/webhooks/{WHID}/activate\n<br />";
13
  if($result->was_successful()) {
14
  echo "Activated with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/list/create.php CHANGED
@@ -10,16 +10,16 @@ $wrap = new CS_REST_Lists(NULL, $auth);
10
  $result = $wrap->create('Lists Client ID', array(
11
  'Title' => 'List Title',
12
  'UnsubscribePage' => 'List unsubscribe page',
13
- 'ConfirmedOptIn' => true,
14
  'ConfirmationSuccessPage' => 'List confirmation success page',
15
  'UnsubscribeSetting' => CS_REST_LIST_UNSUBSCRIBE_SETTING_ALL_CLIENT_LISTS
16
  ));
17
 
18
- echo "Result of POST /api/v3/lists/{clientID}\n<br />";
19
  if($result->was_successful()) {
20
  echo "Created with ID\n<br />".$result->response;
21
  } else {
22
  echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
23
  var_dump($result->response);
24
  echo '</pre>';
25
- }
10
  $result = $wrap->create('Lists Client ID', array(
11
  'Title' => 'List Title',
12
  'UnsubscribePage' => 'List unsubscribe page',
13
+ 'ConfirmedOptIn' => false,
14
  'ConfirmationSuccessPage' => 'List confirmation success page',
15
  'UnsubscribeSetting' => CS_REST_LIST_UNSUBSCRIBE_SETTING_ALL_CLIENT_LISTS
16
  ));
17
 
18
+ echo "Result of POST /api/v3.1/lists/{clientID}\n<br />";
19
  if($result->was_successful()) {
20
  echo "Created with ID\n<br />".$result->response;
21
  } else {
22
  echo 'Failed with code '.$result->http_status_code."\n<br /><pre>";
23
  var_dump($result->response);
24
  echo '</pre>';
25
+ }
lib/createsend/samples/list/create_custom_field.php CHANGED
@@ -24,7 +24,7 @@ $result = $wrap->create_custom_field(array(
24
  'Options' => array('First option', 'Second Option')
25
  ));
26
 
27
- echo "Result of POST /api/v3/lists/{ID}/customfields\n<br />";
28
  if($result->was_successful()) {
29
  echo "Created with ID\n<br />".$result->response;
30
  } else {
24
  'Options' => array('First option', 'Second Option')
25
  ));
26
 
27
+ echo "Result of POST /api/v3.1/lists/{ID}/customfields\n<br />";
28
  if($result->was_successful()) {
29
  echo "Created with ID\n<br />".$result->response;
30
  } else {
lib/createsend/samples/list/create_webhook.php CHANGED
@@ -23,7 +23,7 @@ $result = $wrap->create_webhook(array(
23
  'PayloadFormat' => CS_REST_WEBHOOK_FORMAT_JSON
24
  ));
25
 
26
- echo "Result of POST /api/v3/lists/{ID}/webhooks\n<br />";
27
  if($result->was_successful()) {
28
  echo "Created with ID\n<br />".$result->response;
29
  } else {
23
  'PayloadFormat' => CS_REST_WEBHOOK_FORMAT_JSON
24
  ));
25
 
26
+ echo "Result of POST /api/v3.1/lists/{ID}/webhooks\n<br />";
27
  if($result->was_successful()) {
28
  echo "Created with ID\n<br />".$result->response;
29
  } else {
lib/createsend/samples/list/deactivate_webhook.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->deactivate_webhook('Webhook ID');
11
 
12
- echo "Result of PUT /api/v3/lists/{ID}/webhooks/{WHID}/deactivate\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deactivated with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->deactivate_webhook('Webhook ID');
11
 
12
+ echo "Result of PUT /api/v3.1/lists/{ID}/webhooks/{WHID}/deactivate\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deactivated with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/list/delete.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->delete();
11
 
12
- echo "Result of DELETE /api/v3/lists/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->delete();
11
 
12
+ echo "Result of DELETE /api/v3.1/lists/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/list/delete_custom_field.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->delete_custom_field('Custom field key');
11
 
12
- echo "Result of DELETE /api/v3/lists/{ID}/{Key}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->delete_custom_field('Custom field key');
11
 
12
+ echo "Result of DELETE /api/v3.1/lists/{ID}/{Key}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/list/delete_webhook.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->delete_webhook('Webhook ID');
11
 
12
- echo "Result of DELETE /api/v3/lists/{ID}/webhooks/{WHID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->delete_webhook('Webhook ID');
11
 
12
+ echo "Result of DELETE /api/v3.1/lists/{ID}/webhooks/{WHID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/list/get.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->get();
11
 
12
- echo "Result of GET /api/v3/lists/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got list details\n<br /><pre>";
15
  var_dump($result->response);
9
 
10
  $result = $wrap->get();
11
 
12
+ echo "Result of GET /api/v3.1/lists/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got list details\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/list/get_active_subscribers.php CHANGED
@@ -11,7 +11,7 @@ $result = $wrap->get_active_subscribers('Added since', 1, 50, 'email', 'asc');
11
  //$result = $wrap->get_active_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
- echo "Result of GET /api/v3/lists/{ID}/active\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
11
  //$result = $wrap->get_active_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
+ echo "Result of GET /api/v3.1/lists/{ID}/active\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/list/get_bounced_subscribers.php CHANGED
@@ -11,7 +11,7 @@ $result = $wrap->get_bounced_subscribers('Bounced Since', 1, 50, 'email', 'asc')
11
  //$result = $wrap->get_bounced_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
- echo "Result of GET /api/v3/lists/{ID}/bounced\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
11
  //$result = $wrap->get_bounced_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
+ echo "Result of GET /api/v3.1/lists/{ID}/bounced\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/list/get_custom_fields.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->get_custom_fields();
11
 
12
- echo "Result of GET /api/v3/lists/{ID}/customfields\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got custom fields\n<br /><pre>";
15
  var_dump($result->response);
9
 
10
  $result = $wrap->get_custom_fields();
11
 
12
+ echo "Result of GET /api/v3.1/lists/{ID}/customfields\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got custom fields\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/list/get_deleted_subscribers.php CHANGED
@@ -11,7 +11,7 @@ $result = $wrap->get_deleted_subscribers('Deleted Since', 1, 50, 'email', 'asc')
11
  //$result = $wrap->get_bounced_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
- echo "Result of GET /api/v3/lists/{ID}/deleted\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
11
  //$result = $wrap->get_bounced_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
+ echo "Result of GET /api/v3.1/lists/{ID}/deleted\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/list/get_segments.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->get_segments();
11
 
12
- echo "Result of GET /api/v3/lists/{ID}/segments\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got custom fields\n<br /><pre>";
15
  var_dump($result->response);
9
 
10
  $result = $wrap->get_segments();
11
 
12
+ echo "Result of GET /api/v3.1/lists/{ID}/segments\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got custom fields\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/list/get_stats.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->get_stats();
11
 
12
- echo "Result of GET /api/v3/lists/{ID}/stats\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got list stats\n<br /><pre>";
15
  var_dump($result->response);
9
 
10
  $result = $wrap->get_stats();
11
 
12
+ echo "Result of GET /api/v3.1/lists/{ID}/stats\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got list stats\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/list/get_unconfirmed_subscribers.php CHANGED
@@ -11,7 +11,7 @@ $result = $wrap->get_unconfirmed_subscribers('Added since', 1, 50, 'email', 'asc
11
  //$result = $wrap->get_active_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
- echo "Result of GET /api/v3/lists/{ID}/unconfirmed\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
11
  //$result = $wrap->get_active_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
+ echo "Result of GET /api/v3.1/lists/{ID}/unconfirmed\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/list/get_unsubscribed_subscribers.php CHANGED
@@ -11,7 +11,7 @@ $result = $wrap->get_unsubscribed_subscribers('Unsubscribed Since', 1, 50, 'emai
11
  //$result = $wrap->get_bounced_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
- echo "Result of GET /api/v3/lists/{ID}/unsubscribed\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
11
  //$result = $wrap->get_bounced_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order direction);
13
 
14
+ echo "Result of GET /api/v3.1/lists/{ID}/unsubscribed\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/list/get_webhooks.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->get_webhooks();
11
 
12
- echo "Result of GET /api/v3/lists/{ID}/webhooks\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got list webhooks\n<br /><pre>";
15
  var_dump($result->response);
9
 
10
  $result = $wrap->get_webhooks();
11
 
12
+ echo "Result of GET /api/v3.1/lists/{ID}/webhooks\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got list webhooks\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/list/test_webhook.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
9
 
10
  $result = $wrap->test_webhook('Webhook ID');
11
 
12
- echo "Result of POST /api/v3/lists/{ID}/webhooks/{WHID}/test\n<br />";
13
  if($result->was_successful()) {
14
  echo "Test was successful";
15
  } else {
9
 
10
  $result = $wrap->test_webhook('Webhook ID');
11
 
12
+ echo "Result of POST /api/v3.1/lists/{ID}/webhooks/{WHID}/test\n<br />";
13
  if($result->was_successful()) {
14
  echo "Test was successful";
15
  } else {
lib/createsend/samples/list/update.php CHANGED
@@ -17,7 +17,7 @@ $result = $wrap->update(array(
17
  'ScrubActiveWithSuppList' => true
18
  ));
19
 
20
- echo "Result of PUT /api/v3/lists/{ID}\n<br />";
21
  if($result->was_successful()) {
22
  echo "Updated with code\n<br />".$result->http_status_code;
23
  } else {
17
  'ScrubActiveWithSuppList' => true
18
  ));
19
 
20
+ echo "Result of PUT /api/v3.1/lists/{ID}\n<br />";
21
  if($result->was_successful()) {
22
  echo "Updated with code\n<br />".$result->http_status_code;
23
  } else {
lib/createsend/samples/list/update_custom_field.php CHANGED
@@ -15,7 +15,7 @@ $result = $wrap->update_custom_field(
15
  )
16
  );
17
 
18
- echo "Result of PUT /api/v3/lists/{ID}/customfields/{fieldkey}\n<br />";
19
  if($result->was_successful()) {
20
  echo "Updated with code\n<br />".$result->http_status_code;
21
  } else {
15
  )
16
  );
17
 
18
+ echo "Result of PUT /api/v3.1/lists/{ID}/customfields/{fieldkey}\n<br />";
19
  if($result->was_successful()) {
20
  echo "Updated with code\n<br />".$result->http_status_code;
21
  } else {
lib/createsend/samples/list/update_field_options.php CHANGED
@@ -10,7 +10,7 @@ $wrap = new CS_REST_Lists('List ID', $auth);
10
  $result = $wrap->update_field_options('[CustomFieldKey]',
11
  array('Option 1', 'Option 2'), true);
12
 
13
- echo "Result of PUT /api/v3/lists/{ID}/customfields/{fieldkey}/options\n<br />";
14
  if($result->was_successful()) {
15
  echo "Updated with code\n<br />".$result->http_status_code;
16
  } else {
10
  $result = $wrap->update_field_options('[CustomFieldKey]',
11
  array('Option 1', 'Option 2'), true);
12
 
13
+ echo "Result of PUT /api/v3.1/lists/{ID}/customfields/{fieldkey}/options\n<br />";
14
  if($result->was_successful()) {
15
  echo "Updated with code\n<br />".$result->http_status_code;
16
  } else {
lib/createsend/samples/segment/add_rule.php CHANGED
@@ -7,12 +7,16 @@ $auth = array(
7
  'refresh_token' => 'your refresh token');
8
  $wrap = new CS_REST_Segments('Segment ID', $auth);
9
 
10
- $result = $wrap->add_rule(array(
11
- 'Subject' => 'EmailAddress',
12
- 'Clauses' => array('CONTAINS example.com')
 
 
 
 
13
  ));
14
 
15
- echo "Result of PUT /api/v3/segments/{segmentID}/rules\n<br />";
16
  if($result->was_successful()) {
17
  echo "Updated with code\n<br />".$result->http_status_code;
18
  } else {
7
  'refresh_token' => 'your refresh token');
8
  $wrap = new CS_REST_Segments('Segment ID', $auth);
9
 
10
+ $result = $wrap->add_rulegroup(array(
11
+ 'Rules' => array(
12
+ array(
13
+ 'RuleType' => 'EmailAddress',
14
+ 'Clause' => 'CONTAINS example.com'
15
+ )
16
+ )
17
  ));
18
 
19
+ echo "Result of PUT /api/v3.1/segments/{segmentID}/rules\n<br />";
20
  if($result->was_successful()) {
21
  echo "Updated with code\n<br />".$result->http_status_code;
22
  } else {
lib/createsend/samples/segment/clear_rules.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Segments('Segment ID', $auth);
9
 
10
  $result = $wrap->clear_rules();
11
 
12
- echo "Result of DELETE /api/v3/segments/{ID}/rules\n<br />";
13
  if($result->was_successful()) {
14
  echo "Cleared with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->clear_rules();
11
 
12
+ echo "Result of DELETE /api/v3.1/segments/{ID}/rules\n<br />";
13
  if($result->was_successful()) {
14
  echo "Cleared with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/segment/create.php CHANGED
@@ -9,19 +9,31 @@ $wrap = new CS_REST_Segments(NULL, $auth);
9
 
10
  $result = $wrap->create('Segments List ID', array(
11
  'Title' => 'Segment Title',
12
- 'Rules' => array(
13
  array(
14
- 'Subject' => 'EmailAddress',
15
- 'Clauses' => array('CONTAINS example.com')
 
 
 
 
16
  ),
17
  array(
18
- 'Subject' => '[customfield]',
19
- 'Clauses' => array('PROVIDED', 'EQUALS 1')
 
 
 
 
 
 
 
 
20
  )
21
  )
22
  ));
23
 
24
- echo "Result of POST /api/v3/segments/{listID}\n<br />";
25
  if($result->was_successful()) {
26
  echo "Created with ID\n<br />".$result->response;
27
  } else {
9
 
10
  $result = $wrap->create('Segments List ID', array(
11
  'Title' => 'Segment Title',
12
+ 'RuleGroups' => array(
13
  array(
14
+ 'Rules' => array(
15
+ array(
16
+ 'RuleType' => 'EmailAddress',
17
+ 'Clause' => 'CONTAINS example.com'
18
+ )
19
+ )
20
  ),
21
  array(
22
+ 'Rules' => array(
23
+ array(
24
+ 'RuleType' => '[customfield]',
25
+ 'Clause' => 'PROVIDED'
26
+ ),
27
+ array(
28
+ 'RuleType' => '[customfield]',
29
+ 'Clause' => 'EQUALS 1'
30
+ )
31
+ )
32
  )
33
  )
34
  ));
35
 
36
+ echo "Result of POST /api/v3.1/segments/{listID}\n<br />";
37
  if($result->was_successful()) {
38
  echo "Created with ID\n<br />".$result->response;
39
  } else {
lib/createsend/samples/segment/delete.php CHANGED
@@ -10,7 +10,7 @@ $wrap = new CS_REST_Segments('Segment ID', $auth);
10
 
11
  $result = $wrap->delete();
12
 
13
- echo "Result of DELETE /api/v3/segments/{ID}\n<br />";
14
  if($result->was_successful()) {
15
  echo "Deleted with code\n<br />".$result->http_status_code;
16
  } else {
10
 
11
  $result = $wrap->delete();
12
 
13
+ echo "Result of DELETE /api/v3.1/segments/{ID}\n<br />";
14
  if($result->was_successful()) {
15
  echo "Deleted with code\n<br />".$result->http_status_code;
16
  } else {
lib/createsend/samples/segment/get.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Segments('Segment ID', $auth);
9
 
10
  $result = $wrap->get();
11
 
12
- echo "Result of GET /api/v3/segments/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got segment details\n<br /><pre>";
15
  var_dump($result->response);
9
 
10
  $result = $wrap->get();
11
 
12
+ echo "Result of GET /api/v3.1/segments/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got segment details\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/segment/get_subscribers.php CHANGED
@@ -11,7 +11,7 @@ $result = $wrap->get_subscribers('Added since', 1, 50, 'email', 'asc');
11
  //$result = $wrap->get_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order description);
13
 
14
- echo "Result of GET /api/v3/segments/{segment id}/active\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
11
  //$result = $wrap->get_subscribers(date('Y-m-d', strtotime('-30 days')),
12
  // page number, page size, order by, order description);
13
 
14
+ echo "Result of GET /api/v3.1/segments/{segment id}/active\n<br />";
15
  if($result->was_successful()) {
16
  echo "Got subscribers\n<br /><pre>";
17
  var_dump($result->response);
lib/createsend/samples/segment/update.php CHANGED
@@ -9,19 +9,27 @@ $wrap = new CS_REST_Segments('Segment ID', $auth);
9
 
10
  $result = $wrap->update(array(
11
  'Title' => 'Segment Title',
12
- 'Rules' => array(
13
  array(
14
- 'Subject' => 'EmailAddress',
15
- 'Clauses' => array('CONTAINS example.com')
 
 
 
 
16
  ),
17
  array(
18
- 'Subject' => '[customfield]',
19
- 'Clauses' => array('PROVIDED', 'EQUALS 1')
 
 
 
 
20
  )
21
  )
22
  ));
23
 
24
- echo "Result of PUT /api/v3/segments/{segmentID}\n<br />";
25
  if($result->was_successful()) {
26
  echo "Updated with code\n<br />".$result->http_status_code;
27
  } else {
9
 
10
  $result = $wrap->update(array(
11
  'Title' => 'Segment Title',
12
+ 'RuleGroups' => array(
13
  array(
14
+ 'Rules' => array(
15
+ array(
16
+ 'RuleType' => 'EmailAddress',
17
+ 'Clause' => 'CONTAINS example.com'
18
+ )
19
+ )
20
  ),
21
  array(
22
+ 'Rules' => array(
23
+ array(
24
+ 'RuleType' => '[customfield]',
25
+ 'Clause' => 'EQUALS 1'
26
+ )
27
+ )
28
  )
29
  )
30
  ));
31
 
32
+ echo "Result of PUT /api/v3.1/segments/{segmentID}\n<br />";
33
  if($result->was_successful()) {
34
  echo "Updated with code\n<br />".$result->http_status_code;
35
  } else {
lib/createsend/samples/subscriber/add.php CHANGED
@@ -30,7 +30,7 @@ $result = $wrap->add(array(
30
  'Resubscribe' => true
31
  ));
32
 
33
- echo "Result of POST /api/v3/subscribers/{list id}.{format}\n<br />";
34
  if($result->was_successful()) {
35
  echo "Subscribed with code ".$result->http_status_code;
36
  } else {
30
  'Resubscribe' => true
31
  ));
32
 
33
+ echo "Result of POST /api/v3.1/subscribers/{list id}.{format}\n<br />";
34
  if($result->was_successful()) {
35
  echo "Subscribed with code ".$result->http_status_code;
36
  } else {
lib/createsend/samples/subscriber/delete.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->delete('Email Address');
10
 
11
- echo "Result of DELETE /api/v3/subscribers/{list id}.{format}?email={emailAddress}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Unsubscribed with code ".$result->http_status_code;
14
  } else {
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->delete('Email Address');
10
 
11
+ echo "Result of DELETE /api/v3.1/subscribers/{list id}.{format}?email={emailAddress}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Unsubscribed with code ".$result->http_status_code;
14
  } else {
lib/createsend/samples/subscriber/get.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->get('Email address');
10
 
11
- echo "Result of GET /api/v3/subscribers/{list id}.{format}?email={email}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got subscriber <pre>";
14
  var_dump($result->response);
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->get('Email address');
10
 
11
+ echo "Result of GET /api/v3.1/subscribers/{list id}.{format}?email={email}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got subscriber <pre>";
14
  var_dump($result->response);
lib/createsend/samples/subscriber/get_history.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->get_history('Email address');
10
 
11
- echo "Result of GET /api/v3/subscribers/{list id}/history.{format}?email={email}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got subscriber history <pre>";
14
  var_dump($result->response);
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->get_history('Email address');
10
 
11
+ echo "Result of GET /api/v3.1/subscribers/{list id}/history.{format}?email={email}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Got subscriber history <pre>";
14
  var_dump($result->response);
lib/createsend/samples/subscriber/import.php CHANGED
@@ -52,9 +52,9 @@ $result = $wrap->import(array(
52
  )
53
  )
54
  )
55
- ), true);
56
 
57
- echo "Result of POST /api/v3/subscribers/{list id}/import.{format}\n<br />";
58
  if($result->was_successful()) {
59
  echo "Subscribed with results <pre>";
60
  var_dump($result->response);
@@ -74,4 +74,4 @@ if($result->was_successful()) {
74
  echo 'The following emails failed to import correctly.<pre>';
75
  var_dump($result->response->ResultData->FailureDetails);
76
  }
77
- echo '</pre>';
52
  )
53
  )
54
  )
55
+ ), false);
56
 
57
+ echo "Result of POST /api/v3.1/subscribers/{list id}/import.{format}\n<br />";
58
  if($result->was_successful()) {
59
  echo "Subscribed with results <pre>";
60
  var_dump($result->response);
74
  echo 'The following emails failed to import correctly.<pre>';
75
  var_dump($result->response->ResultData->FailureDetails);
76
  }
77
+ echo '</pre>';
lib/createsend/samples/subscriber/unsubscribe.php CHANGED
@@ -8,7 +8,7 @@ $auth = array(
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->unsubscribe('Email Address');
10
 
11
- echo "Result of GET /api/v3/subscribers/{list id}/unsubscribe.{format}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Unsubscribed with code ".$result->http_status_code;
14
  } else {
8
  $wrap = new CS_REST_Subscribers('Your list ID', $auth);
9
  $result = $wrap->unsubscribe('Email Address');
10
 
11
+ echo "Result of GET /api/v3.1/subscribers/{list id}/unsubscribe.{format}\n<br />";
12
  if($result->was_successful()) {
13
  echo "Unsubscribed with code ".$result->http_status_code;
14
  } else {
lib/createsend/samples/subscriber/update.php CHANGED
@@ -18,7 +18,7 @@ $result = $wrap->update('Old Email Address', array(
18
  'Resubscribe' => true
19
  ));
20
 
21
- echo "Result of PUT /api/v3/subscribers/{list id}.{format}?email={email}\n<br />";
22
  if($result->was_successful()) {
23
  echo "Subscribed with code ".$result->http_status_code;
24
  } else {
18
  'Resubscribe' => true
19
  ));
20
 
21
+ echo "Result of PUT /api/v3.1/subscribers/{list id}.{format}?email={email}\n<br />";
22
  if($result->was_successful()) {
23
  echo "Subscribed with code ".$result->http_status_code;
24
  } else {
lib/createsend/samples/template/create.php CHANGED
@@ -13,7 +13,7 @@ $result = $wrap->create('Templates Client ID', array(
13
  'ZipFileURL' => 'Template Images Zip URL'
14
  ));
15
 
16
- echo "Result of POST /api/v3/templates/{clientID}\n<br />";
17
  if($result->was_successful()) {
18
  echo "Created with ID\n<br />".$result->response;
19
  } else {
13
  'ZipFileURL' => 'Template Images Zip URL'
14
  ));
15
 
16
+ echo "Result of POST /api/v3.1/templates/{clientID}\n<br />";
17
  if($result->was_successful()) {
18
  echo "Created with ID\n<br />".$result->response;
19
  } else {
lib/createsend/samples/template/delete.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Templates('Template ID', $auth);
9
 
10
  $result = $wrap->delete();
11
 
12
- echo "Result of DELETE /api/v3/templates/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
9
 
10
  $result = $wrap->delete();
11
 
12
+ echo "Result of DELETE /api/v3.1/templates/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Deleted with code\n<br />".$result->http_status_code;
15
  } else {
lib/createsend/samples/template/get.php CHANGED
@@ -9,7 +9,7 @@ $wrap = new CS_REST_Templates('Template ID', $auth);
9
 
10
  $result = $wrap->get();
11
 
12
- echo "Result of GET /api/v3/templates/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got template details\n<br /><pre>";
15
  var_dump($result->response);
9
 
10
  $result = $wrap->get();
11
 
12
+ echo "Result of GET /api/v3.1/templates/{ID}\n<br />";
13
  if($result->was_successful()) {
14
  echo "Got template details\n<br /><pre>";
15
  var_dump($result->response);
lib/createsend/samples/template/update.php CHANGED
@@ -13,7 +13,7 @@ $result = $wrap->update(array(
13
  'ZipFileURL' => 'Template Images Zip URL'
14
  ));
15
 
16
- echo "Result of PUT /api/v3/templates/{ID}\n<br />";
17
  if($result->was_successful()) {
18
  echo "Updated with code\n<br />".$result->http_status_code;
19
  } else {
13
  'ZipFileURL' => 'Template Images Zip URL'
14
  ));
15
 
16
+ echo "Result of PUT /api/v3.1/templates/{ID}\n<br />";
17
  if($result->was_successful()) {
18
  echo "Updated with code\n<br />".$result->http_status_code;
19
  } else {
lib/createsend/tests/csrest_segments_test.php CHANGED
@@ -37,10 +37,14 @@ abstract class CS_REST_TestSegments extends CS_REST_TestBase {
37
 
38
  $segment = array (
39
  'Title' => 'ABC Widgets Subscribers',
40
- 'Rules' => array(
41
  array(
42
- 'Subject' => 'EmailAddress',
43
- 'Clauses' => array('CONTAINS abcwidgets.com')
 
 
 
 
44
  )
45
  )
46
  );
@@ -69,10 +73,14 @@ abstract class CS_REST_TestSegments extends CS_REST_TestBase {
69
 
70
  $segment = array (
71
  'Title' => 'ABC Widgets Subscribers',
72
- 'Rules' => array(
73
  array(
74
- 'Subject' => 'EmailAddress',
75
- 'Clauses' => array('CONTAINS abcwidgets.com')
 
 
 
 
76
  )
77
  )
78
  );
@@ -81,18 +89,22 @@ abstract class CS_REST_TestSegments extends CS_REST_TestBase {
81
  $raw_result, $raw_result, 'segment was serialised to this');
82
  }
83
 
84
- function testadd_rule() {
85
  $raw_result = '';
86
 
87
  $call_options = $this->get_call_options($this->segment_base_route.'/rules.json', 'POST');
88
 
89
- $rule = array (
90
- 'Subject' => 'EmailAddress',
91
- 'Clauses' => array('CONTAINS abcwidgets.com')
 
 
 
 
92
  );
93
 
94
- $this->general_test_with_argument('add_rule', $rule, $call_options,
95
- $raw_result, $raw_result, 'rule was serialised to this');
96
  }
97
 
98
  function testget() {
37
 
38
  $segment = array (
39
  'Title' => 'ABC Widgets Subscribers',
40
+ 'RuleGroups' => array(
41
  array(
42
+ 'Rules' => array(
43
+ array(
44
+ 'RuleType' => 'EmailAddress',
45
+ 'Clause' => 'CONTAINS abcwidgets.com'
46
+ )
47
+ )
48
  )
49
  )
50
  );
73
 
74
  $segment = array (
75
  'Title' => 'ABC Widgets Subscribers',
76
+ 'RuleGroups' => array(
77
  array(
78
+ 'Rules' => array(
79
+ array(
80
+ 'RuleType' => 'EmailAddress',
81
+ 'Clause' => 'CONTAINS abcwidgets.com'
82
+ )
83
+ )
84
  )
85
  )
86
  );
89
  $raw_result, $raw_result, 'segment was serialised to this');
90
  }
91
 
92
+ function testadd_rulegroup() {
93
  $raw_result = '';
94
 
95
  $call_options = $this->get_call_options($this->segment_base_route.'/rules.json', 'POST');
96
 
97
+ $rulegroup = array(
98
+ 'Rules' => array(
99
+ array(
100
+ 'RuleType' => 'EmailAddress',
101
+ 'Clause' => 'CONTAINS abcwidgets.com'
102
+ )
103
+ )
104
  );
105
 
106
+ $this->general_test_with_argument('add_rulegroup', $rulegroup, $call_options,
107
+ $raw_result, $raw_result, 'rulegroup was serialised to this');
108
  }
109
 
110
  function testget() {
lib/createsend/tests/csrest_test.php CHANGED
@@ -31,7 +31,7 @@ class CS_REST_TestBase extends UnitTestCase {
31
  $this->mock_transport->setReturnValue('get_type', $this->transport_type);
32
  $this->mock_serialiser->setReturnValue('get_type', $this->serialisation_type);
33
 
34
- $this->base_route = $this->protocol.'://'.$this->api_host.'/api/v3/';
35
 
36
  $this->set_up_inner();
37
  }
@@ -197,29 +197,6 @@ abstract class CS_REST_TestGeneral extends CS_REST_TestBase {
197
  $this->general_test('get_countries', $call_options, $raw_result, $deserialised);
198
  }
199
 
200
- function testget_apikey() {
201
- $raw_result = 'another fake api key';
202
- $username = 'username';
203
- $password = 'password';
204
- $site_url = 'unit.test.createsend.com';
205
-
206
- $call_options = $this->get_call_options($this->base_route.'apikey.json?siteurl='.$site_url);
207
- $call_options['authdetails'] = array('username' => $username, 'password' => $password);
208
-
209
- $transport_result = array (
210
- 'code' => 200,
211
- 'response' => $raw_result
212
- );
213
-
214
- $expected_result = new CS_REST_Wrapper_Result($raw_result, 200);
215
-
216
- $this->setup_transport_and_serialisation($transport_result, $call_options,
217
- $raw_result, $raw_result);
218
-
219
- $result = $this->wrapper->get_apikey($username, $password, $site_url);
220
- $this->assertIdentical($expected_result, $result);
221
- }
222
-
223
  function testget_clients() {
224
  $raw_result = 'some clients';
225
  $deserialised = array('Curran & Hughes', 'Repsol');
31
  $this->mock_transport->setReturnValue('get_type', $this->transport_type);
32
  $this->mock_serialiser->setReturnValue('get_type', $this->serialisation_type);
33
 
34
+ $this->base_route = $this->protocol.'://'.$this->api_host.'/api/v3.1/';
35
 
36
  $this->set_up_inner();
37
  }
197
  $this->general_test('get_countries', $call_options, $raw_result, $deserialised);
198
  }
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  function testget_clients() {
201
  $raw_result = 'some clients';
202
  $deserialised = array('Curran & Hughes', 'Repsol');
lib/createsend/tests/responses/oauth_exchange_token.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ {
2
+ "access_token": "SlAV32hkKG",
3
+ "expires_in": 1209600,
4
+ "refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA"
5
+ }
lib/createsend/tests/responses/segment_details.json CHANGED
@@ -1,16 +1,16 @@
1
  {
2
  "ActiveSubscribers": 0,
3
- "Rules": [
4
  {
5
- "Subject": "EmailAddress",
6
- "Clauses": [
7
- "CONTAINS @hello.com"
8
- ]
9
- },
10
- {
11
- "Subject": "Name",
12
- "Clauses": [
13
- "PROVIDED"
14
  ]
15
  }
16
  ],
1
  {
2
  "ActiveSubscribers": 0,
3
+ "RuleGroups": [
4
  {
5
+ "Rules": [
6
+ {
7
+ "RuleType": "EmailAddress",
8
+ "Clause": "CONTAINS @hello.com"
9
+ },
10
+ {
11
+ "RuleType": "Name",
12
+ "Clause": "PROVIDED"
13
+ }
14
  ]
15
  }
16
  ],
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DigitalPianism_CampaignMonitor</name>
4
- <version>0.7.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -12,13 +12,11 @@
12
  &lt;p&gt;Campaign Monitor is built for designers who can create great looking emails for themselves and their clients, but need software to send each campaign, track the results and manage their subscribers." www.campaignmonitor.com&lt;/p&gt;&#xD;
13
  &#xD;
14
  &lt;p&gt;This extension integrates Magento with the Campaign Monitor mailing list manager. Users are added to a specified Campaign Monitor email list when they subscribe to the newsletter in Magento, and removed when they unsubscribe. Users are also marked as unsubscribed in Magento when they click an unsubscribe link in a Campaign Monitor email.&lt;/p&gt;</description>
15
- <notes>- Bug fixes regarding errors and sessions.&#xD;
16
- - Remove unused variables.&#xD;
17
- - PHPDoc.</notes>
18
  <authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
19
- <date>2014-12-19</date>
20
- <time>11:29:20</time>
21
- <contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="CampaignMonitor"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Auth.php" hash="03f5ad4c1afcc1949a77c82e4754d7eb"/><file name="Refreshtoken.php" hash="c3f7c8e3f26fa6342b5c2e4b8f6f4af2"/></dir></dir><dir name="Source"><file name="Authtype.php" hash="b8b4ba474b60f65d782b0103824366d8"/></dir></dir></dir></dir><file name="Linkedattributes.php" hash="d340c35fb2706d231dd5ffc5b7029f4c"/></dir><dir name="Helper"><file name="Data.php" hash="470de2a5ba28f6ae77436fe5f460b9b2"/></dir><dir name="Model"><file name="Auth.php" hash="dcd007ea3d972044fee5996735f1d046"/><dir name="Checkout"><file name="Observer.php" hash="861ede2ace71e1dbaea2becdf8cca605"/><dir name="Type"><file name="Onepage.php" hash="a41a043ff4e754394a5397c6e7fdcf31"/></dir></dir><dir name="Customer"><file name="Observer.php" hash="09ae364c8fc3f1f60cae2b55eb13a8ee"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Authtype.php" hash="81eb0bb400f23662bbf7f9ad8f4e44db"/></dir></dir></dir></dir><dir name="controllers"><file name="AdminhookController.php" hash="8d25dd0cfceaf877d8c4c704b011f768"/><dir name="Adminhtml"><file name="AuthController.php" hash="d761d513746139714b0ad7d2c222daef"/></dir><file name="AuthController.php" hash="9cffffa9ff747b207319fb3b59ca36ea"/><file name="HookController.php" hash="d622ed64cd935c3e9d473186b0707d89"/><dir name="Newsletter"><file name="SubscriberController.php" hash="4f3e3bc385c871c9eb5546d845e186cf"/></dir><file name="UnsubscribeController.php" hash="1fee87e2057b8e1c09f87a2244833cdb"/></dir><dir name="etc"><file name="config.xml" hash="24b90ddd0f94a38587cfb2321f4a06d0"/><file name="system.xml" hash="bf9b3e5c5f5c622ca69db63664b2bb77"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_CampaignMonitor.xml" hash="6044d29d2b2e7d0689315376e3c27acd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="digitalpianism"><dir name="campaignmonitor"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array_dropdown.phtml" hash="ac84db9b1e8b342337a478ecba62e0b1"/><file name="auth.phtml" hash="ec611006cadbb39caff40e5115b78586"/><file name="refreshtoken.phtml" hash="1d43c3e66c3c89a1d857b328eae6997f"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="digitalpianism"><file name="campaignmonitor.xml" hash="d01714d890051c5d01c82ad9624fcba6"/></dir></dir><dir name="template"><dir name="digitalpianism"><dir name="campaignmonitor"><dir name="persistent"><dir name="checkout"><file name="billing.phtml" hash="64b8515cd7eab3136d64ec5a0f2328d2"/><dir name="onepage"><file name="checkoutnewsletter.phtml" hash="ae24dcbc1ee1bcc353533f5ea7c7d572"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="createsend"><file name="HISTORY.md" hash="ab283bd0126e8c10edf6da099c80a661"/><file name="LICENSE" hash="e4306d4b6c77f2db816ec4aed73a13c7"/><file name="README.md" hash="90a7855700d85e14211baf5399810a3d"/><file name="RELEASE.md" hash="5efce8234607beab27bf466b23fc4535"/><dir name="class"><file name="base_classes.php" hash="8a3f82c1204d7de080d2f3d15cb70ea9"/><file name="cacert.pem" hash="c29d362201b1bd232898d2b658811db2"/><file name="log.php" hash="11ff6a9006a6386c1cd8880cd3c0f41b"/><file name="serialisation.php" hash="3eb39437970e8787f0ef9ac292b688e6"/><file name="services_json.php" hash="c9e9ef0d35d7d34f9d216344da27915d"/><file name="transport.php" hash="da2967846daf164a70e649c9f2ee0094"/></dir><file name="composer.json" hash="eccad7521596b5fe0d81af51ab2f16a1"/><file name="composer.lock" hash="e64bca0a5accd8086e4e49bf41aa8629"/><file name="csrest_administrators.php" hash="72480342a46e8d82fd44096b4818f090"/><file name="csrest_campaigns.php" hash="38e2c429abaaa4609d30f28622e5fc3f"/><file name="csrest_clients.php" hash="df11ce1c1fd5fd43980db42cb83a6fa3"/><file name="csrest_general.php" hash="b8d1de7d1e435231955cdf8bc0311632"/><file name="csrest_lists.php" hash="42904680a424977d7c6f3211cf0d7a9c"/><file name="csrest_people.php" hash="ff2a14af7e171a11d73bef3d4995f512"/><file name="csrest_segments.php" hash="bac0e031058e7e08ae97906738cc65fc"/><file name="csrest_subscribers.php" hash="b5ad794e2cc2f65a278a8aa9de4af7d7"/><file name="csrest_templates.php" hash="4c94511a505a868eef2f8109ca3c35d6"/><dir name="samples"><dir name="campaign"><file name="create.php" hash="af4016e1b3539b3710d4b8e05bc7001b"/><file name="create_from_template.php" hash="4868b7f363abebc3d9fe9f561e59a743"/><file name="delete.php" hash="b96c2421084e77c241ea270894719aff"/><file name="get_bounces.php" hash="3bd2b2faa8d4b99bf7b9d682ce7402d3"/><file name="get_clicks.php" hash="92209680bdd73ecf3f94ecd1c33374ce"/><file name="get_email_client_usage.php" hash="fcf3a316f03460f26b6f12bcb20c17b0"/><file name="get_lists_and_segments.php" hash="e7d07e56924abfbd2d390b468d2df14b"/><file name="get_opens.php" hash="e155bf6a72a26fd34997d9024bd9911c"/><file name="get_recipients.php" hash="488f76fba7f7e2dc0680abefe5fe1fb5"/><file name="get_spam.php" hash="35c0beea84a51e3e447546f6b11ba754"/><file name="get_summary.php" hash="85ee04ac9adc616aa41d5a02824e6f7c"/><file name="get_unsubscribes.php" hash="af39956e9f46d9ecd1e78fff830f87b0"/><file name="send.php" hash="9e33ed7bd15e246929f52847f93827ce"/><file name="send_preview.php" hash="4eb7bff25251b00915791b96b20ee2ab"/><file name="unschedule.php" hash="83f0374d69eee6ae284c7fe27fdb65d7"/></dir><dir name="client"><file name="create.php" hash="8fbadcd57df2246a8447d3a3b9843d64"/><file name="delete.php" hash="a7a9945427a64737981c4a3a5c047d97"/><file name="get.php" hash="0b53f225d317d3d97bb0f3bafe83cf53"/><file name="get_campaigns.php" hash="242ed8ed7338a502751ead210283cb04"/><file name="get_drafts.php" hash="2efeea55251ec1e7e7c7767820dd28f1"/><file name="get_lists.php" hash="97ffa5cd9ccc765ae79baff0f50ece64"/><file name="get_lists_for_email.php" hash="a402b11a7b93dc6992dc69998a0ebf80"/><file name="get_scheduled.php" hash="163d89985d5fdc29d9f3a5d50787fd81"/><file name="get_segments.php" hash="9acd7c148db84fd03d825a6eaebd0b88"/><file name="get_suppressionlist.php" hash="2ae6c31510338b307f93d49369c964d1"/><file name="get_templates.php" hash="756789c223be6664b3517b79063f5143"/><file name="set_basics.php" hash="839bc9f656d26caf7335b2a4f4336ae8"/><file name="set_monthly_billing.php" hash="7f4ff840e6fe78932f9bc72e68c282da"/><file name="set_payg_billing.php" hash="2f67604445e8807a70a9e28759f3bb55"/><file name="suppress.php" hash="f78f0ddb442c9dfc53865c00ee57d266"/><file name="transfer_credits.php" hash="3fe8a12cef59a2d126d8ed7437563ec8"/><file name="unsuppress.php" hash="3442665090da89c2f5d91f6b69c18ade"/></dir><file name="get_apikey.php" hash="36f399338a612b2771ed3c53058d1d6f"/><file name="get_billing_details.php" hash="bfe297ec441b25eaa6155e283b4c0bf7"/><file name="get_clients.php" hash="521e3174750e8c41236c1c4fae5ae8f4"/><file name="get_countries.php" hash="6a71a585ef76eedec4589ecc303415f5"/><file name="get_systemdate.php" hash="7b5eeae853d164667140fb3c99a5b8ff"/><file name="get_timezones.php" hash="f756ab9b392af894320defe0f7f7296d"/><dir name="list"><file name="activate_webhook.php" hash="ca496e62c78429fa745f624738b80ce7"/><file name="create.php" hash="16a635a4de9ec820b08a7f30319534bd"/><file name="create_custom_field.php" hash="59ad0fe4d6b2038ceeda7681e4515dd0"/><file name="create_webhook.php" hash="d968c28b19521f6d3c5e6852c5c13806"/><file name="deactivate_webhook.php" hash="68478920fca13c0c1f98a450be8cb3c2"/><file name="delete.php" hash="12f035403835a63c7a0c1ba4704b3e46"/><file name="delete_custom_field.php" hash="f5031a6eac6ba776b54ac22a79c023b5"/><file name="delete_webhook.php" hash="080320b7e078ce0e33586e4c6a944172"/><file name="get.php" hash="25dcb3de68cd41792ec88d7d937217e8"/><file name="get_active_subscribers.php" hash="afcee93bc1b922a99c9e19f48894417b"/><file name="get_bounced_subscribers.php" hash="2fa45e557cca0d93924a6415fbc302d5"/><file name="get_custom_fields.php" hash="ddcaf8ee644474bb77d597894f8e501e"/><file name="get_deleted_subscribers.php" hash="400adee5529e1e0f16ff7b64b09e8bca"/><file name="get_segments.php" hash="1ddba11f0968d2d7e7109e14140e7663"/><file name="get_stats.php" hash="74ab2cf477a5049505f1959c3e9e272c"/><file name="get_unconfirmed_subscribers.php" hash="e6062d83308ccc7648d8c17200d5f277"/><file name="get_unsubscribed_subscribers.php" hash="366d5bbd88a4028b664be59420a1a0aa"/><file name="get_webhooks.php" hash="bbcb6401f2a1d3268f25405b3cbe4598"/><file name="list_webhook_receiver.php" hash="12ca45146c050f341423f80acbe688aa"/><file name="test_webhook.php" hash="22bf2bdf4c277bc86300d43018e4926e"/><file name="update.php" hash="acb1f015b02b9d66da6d286843def237"/><file name="update_custom_field.php" hash="8b5f33bc803fa29fb0a44847a0d399ec"/><file name="update_field_options.php" hash="809ed63991f1e799ee2c2b70f3c692f4"/></dir><dir name="segment"><file name="add_rule.php" hash="3ed9335f70c354cf068a176eb6dd8f6f"/><file name="clear_rules.php" hash="da68802f93c3c25a60fcf1a2b7603273"/><file name="create.php" hash="4f12c0099e9edc42ab55acfd80239ecd"/><file name="delete.php" hash="9079d2812da34ce862f9543513eb7efc"/><file name="get.php" hash="f4e65cd88d02dc5fa0c2d9d7d1a444e6"/><file name="get_subscribers.php" hash="a580a7c33025bd516cae2e8b87cc10dd"/><file name="update.php" hash="cb37cd60257eb361f80f69dfa830ab94"/></dir><dir name="subscriber"><file name="add.php" hash="f266ce4459f71665e29d25bb5181ba76"/><file name="delete.php" hash="08325db91e593b855749bc5d9381f5e3"/><file name="get.php" hash="e4d4cda7ed515df7ab7e81c72906601d"/><file name="get_history.php" hash="445b5dfc75fec5433986655437f5f608"/><file name="import.php" hash="119de43ee1e4b31ce2b710ad4507a25f"/><file name="unsubscribe.php" hash="7896a14a7bbb69a8b4d1db9ead52053f"/><file name="update.php" hash="4a62f2b72d31cb168258738483366707"/></dir><dir name="template"><file name="create.php" hash="0ed844ae8d5fc1025902a7fcfb8a949b"/><file name="delete.php" hash="ddd8cbab53644e863d5f0d4807e03719"/><file name="get.php" hash="3d5147086b92c85e7b0289ba065f9434"/><file name="update.php" hash="0854c3686f1339434cb6fb12897f801f"/></dir></dir><dir name="tests"><file name="all_tests.php" hash="3fafbd947aa885d9056ed62e832ca61b"/><dir name="class_tests"><file name="response_tests.php" hash="ae5b4f541ac5bcba7a9417544d2156a9"/><file name="transport_test.php" hash="3033343417f283136c43d0bab77ac355"/></dir><file name="csrest_administrators_test.php" hash="77830067da14a226bfdc86b445f68f30"/><file name="csrest_campaigns_test.php" hash="ce68576c81c314dbdeba2b229903d865"/><file name="csrest_clients_test.php" hash="d3023b37bc3ebf222171606a100532d5"/><file name="csrest_lists_test.php" hash="533753c96477cad7598382c94e9a8937"/><file name="csrest_people_test.php" hash="72269f3d21caaf5648684da44b0ad319"/><file name="csrest_segments_test.php" hash="33f275bcab02eacb32299d6fc63e1b7c"/><file name="csrest_subscribers_test.php" hash="8b6ec2dade2d5b59d8f27f7e32df049f"/><file name="csrest_template_test.php" hash="3645fc50d5e43da11fa1a2b496b692c4"/><file name="csrest_test.php" hash="de298e06f8b584018f8e6b1d14000f32"/><dir name="responses"><file name="active_subscribers.json" hash="414033ce6952d88c0edd3c7b04d4f14e"/><file name="add_subscriber.json" hash="236507977b97832343c87955243068ad"/><file name="apikey.json" hash="4ca4132cc99f80bfc3d4a029a77a7a6e"/><file name="bounced_subscribers.json" hash="78c52687485c30c0fb031eb82e472fb3"/><file name="campaign_bounces.json" hash="55471525555dacee6ca1eb9ed5826cea"/><file name="campaign_clicks.json" hash="57d3357f4a0d8b55042a80e6d984e1ea"/><file name="campaign_listsandsegments.json" hash="a0d21dda2042a25b1266036b5d945f0c"/><file name="campaign_opens.json" hash="50c3052eebc922dfd0293498b5374ef0"/><file name="campaign_recipients.json" hash="be59c57f1f497669260f5124c13d109e"/><file name="campaign_spam.json" hash="48fa85397d6d8da1a685a94c404d14a9"/><file name="campaign_summary.json" hash="248d074230990e424dedb26afac895eb"/><file name="campaign_unsubscribes.json" hash="87d6b967ec28f8b3cd7845acc3ba0a16"/><file name="campaigns.json" hash="3b160d6e1a5de3e6163f2fffa502e4cb"/><file name="client_details.json" hash="964787a45923035cdd7330d4af13dfd9"/><file name="clients.json" hash="b243ae5d2f1b0686a6f45bbc262b1ad5"/><file name="countries.json" hash="7baa975380541216a7829128d4d7fb5b"/><file name="create_campaign.json" hash="61079127bd26d95434347f30803a85b2"/><file name="create_client.json" hash="0b5ea68aeecf1f61c8a00fb5d2b89104"/><file name="create_custom_field.json" hash="49b9878fd944fa8ea2f283a3d0b6576b"/><file name="create_list.json" hash="33b7d284c287fa44edb649234bc2ac6b"/><file name="create_list_webhook.json" hash="8a1c9ea0268a3a58d8f8fdaa4f159519"/><file name="create_segment.json" hash="6183146c3898ae281ea640e40fb5b3b0"/><file name="create_template.json" hash="9b1fcc1ae0925bd552cb23e364d48cca"/><file name="custom_api_error.json" hash="6be6c0df48a411fc54a5abf1d8502690"/><file name="custom_fields.json" hash="fe40aa43df15068516cdc6b7d9e2148c"/><file name="deleted_subscribers.json" hash="176235e9b24405ed329cc40a9ac5d1cd"/><file name="drafts.json" hash="8b36d3bf66ebb683b6926fcef95ae106"/><file name="import_subscribers.json" hash="3c7c7d85d510224197dc597d3a6cf585"/><file name="import_subscribers_partial_success.json" hash="4e1ff5c7b33a77d709530a31f544a22d"/><file name="list_details.json" hash="09d06afb7cd013e74fe615ddfd5a6799"/><file name="list_stats.json" hash="b8cd04e30e5e30862f005208997655de"/><file name="list_webhooks.json" hash="93194d66734e07372cac1b5c9c04f2b5"/><file name="lists.json" hash="0b7f8013e3e93a105a7a7d8c156daf4d"/><file name="listsforemail.json" hash="c7eb2e23b02883e0a0f9a9b2ca9bc94a"/><file name="scheduled.json" hash="d7c9df96fbfa5bafb1e1cfc0643123b7"/><file name="segment_details.json" hash="9ec00f104a565fc723270e3ceb91d509"/><file name="segment_subscribers.json" hash="cf5cec4bc4e7970315ea929a0bd29ecd"/><file name="segments.json" hash="d2d9265fd87ed661cd65c9c96b31a2f0"/><file name="subscriber_details.json" hash="1c5733a762560ed1dc27449edea3c27f"/><file name="subscriber_history.json" hash="93d3efaa0f0373156146e9f3060ca855"/><file name="suppressionlist.json" hash="13fff3aeddf64804cf8d9232b79ab45b"/><file name="systemdate.json" hash="5f2f368919effd4c7d36bc11d42d8198"/><file name="template_details.json" hash="81fa02e23c0a9c00c55730956a2868b0"/><file name="templates.json" hash="64aca93871da82620071a26c818da4ce"/><file name="timezones.json" hash="ff9bbd7171fe05f5bace2fc8087953d0"/><file name="unsubscribed_subscribers.json" hash="0f7cec268e4241426a5c7dcc33ba99eb"/></dir></dir><file name=".gitignore" hash="1416491a3a84679680a343e7adf1f20d"/><file name=".travis.yml" hash="3f3c6ec40583a10d8ec8dfa89a2010e8"/></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DigitalPianism_CampaignMonitor</name>
4
+ <version>0.7.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
12
  &lt;p&gt;Campaign Monitor is built for designers who can create great looking emails for themselves and their clients, but need software to send each campaign, track the results and manage their subscribers." www.campaignmonitor.com&lt;/p&gt;&#xD;
13
  &#xD;
14
  &lt;p&gt;This extension integrates Magento with the Campaign Monitor mailing list manager. Users are added to a specified Campaign Monitor email list when they subscribe to the newsletter in Magento, and removed when they unsubscribe. Users are also marked as unsubscribed in Magento when they click an unsubscribe link in a Campaign Monitor email.&lt;/p&gt;</description>
15
+ <notes>- Update the createsend library to fix the "include(Services/JSON.php): failed to open stream" error.</notes>
 
 
16
  <authors><author><name>Digital Pianism</name><user>digitalpianism</user><email>contact@digital-pianism.com</email></author></authors>
17
+ <date>2015-05-15</date>
18
+ <time>09:25:26</time>
19
+ <contents><target name="magecommunity"><dir name="DigitalPianism"><dir name="CampaignMonitor"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Auth.php" hash="03f5ad4c1afcc1949a77c82e4754d7eb"/><file name="Refreshtoken.php" hash="c3f7c8e3f26fa6342b5c2e4b8f6f4af2"/></dir></dir><dir name="Source"><file name="Authtype.php" hash="b8b4ba474b60f65d782b0103824366d8"/></dir></dir></dir></dir><file name="Linkedattributes.php" hash="d340c35fb2706d231dd5ffc5b7029f4c"/></dir><dir name="Helper"><file name="Data.php" hash="470de2a5ba28f6ae77436fe5f460b9b2"/></dir><dir name="Model"><file name="Auth.php" hash="dcd007ea3d972044fee5996735f1d046"/><dir name="Checkout"><file name="Observer.php" hash="861ede2ace71e1dbaea2becdf8cca605"/><dir name="Type"><file name="Onepage.php" hash="a41a043ff4e754394a5397c6e7fdcf31"/></dir></dir><dir name="Customer"><file name="Observer.php" hash="09ae364c8fc3f1f60cae2b55eb13a8ee"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Authtype.php" hash="81eb0bb400f23662bbf7f9ad8f4e44db"/></dir></dir></dir></dir><dir name="controllers"><file name="AdminhookController.php" hash="8d25dd0cfceaf877d8c4c704b011f768"/><dir name="Adminhtml"><file name="AuthController.php" hash="d761d513746139714b0ad7d2c222daef"/></dir><file name="AuthController.php" hash="9cffffa9ff747b207319fb3b59ca36ea"/><file name="HookController.php" hash="d622ed64cd935c3e9d473186b0707d89"/><dir name="Newsletter"><file name="SubscriberController.php" hash="4f3e3bc385c871c9eb5546d845e186cf"/></dir><file name="UnsubscribeController.php" hash="1fee87e2057b8e1c09f87a2244833cdb"/></dir><dir name="etc"><file name="config.xml" hash="e92873aecfdb3037ae482a3e43953b71"/><file name="system.xml" hash="bf9b3e5c5f5c622ca69db63664b2bb77"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DigitalPianism_CampaignMonitor.xml" hash="6044d29d2b2e7d0689315376e3c27acd"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="digitalpianism"><dir name="campaignmonitor"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array_dropdown.phtml" hash="ac84db9b1e8b342337a478ecba62e0b1"/><file name="auth.phtml" hash="ec611006cadbb39caff40e5115b78586"/><file name="refreshtoken.phtml" hash="1d43c3e66c3c89a1d857b328eae6997f"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="digitalpianism"><file name="campaignmonitor.xml" hash="d01714d890051c5d01c82ad9624fcba6"/></dir></dir><dir name="template"><dir name="digitalpianism"><dir name="campaignmonitor"><dir name="persistent"><dir name="checkout"><file name="billing.phtml" hash="64b8515cd7eab3136d64ec5a0f2328d2"/><dir name="onepage"><file name="checkoutnewsletter.phtml" hash="ae24dcbc1ee1bcc353533f5ea7c7d572"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="createsend"><file name="CONTRIBUTING.md" hash="cb78f59d308ff4bc2aefbfa778928b9e"/><file name="HISTORY.md" hash="91a2a0f7df7bbdc87c5b49bc05eaca98"/><file name="LICENSE" hash="e4306d4b6c77f2db816ec4aed73a13c7"/><file name="README.md" hash="90a7855700d85e14211baf5399810a3d"/><file name="RELEASE.md" hash="5efce8234607beab27bf466b23fc4535"/><dir name="class"><file name="base_classes.php" hash="292dc3e1568f96eb29e86cb3a7c8e951"/><file name="cacert.pem" hash="c29d362201b1bd232898d2b658811db2"/><file name="log.php" hash="11ff6a9006a6386c1cd8880cd3c0f41b"/><file name="serialisation.php" hash="88434ef3d6a03cca7688e643dcf4fd6e"/><file name="services_json.php" hash="c9e9ef0d35d7d34f9d216344da27915d"/><file name="transport.php" hash="2b07cb4bbfe38474cec925edf45960e0"/></dir><file name="composer.json" hash="eccad7521596b5fe0d81af51ab2f16a1"/><file name="composer.lock" hash="e64bca0a5accd8086e4e49bf41aa8629"/><file name="csrest_administrators.php" hash="72480342a46e8d82fd44096b4818f090"/><file name="csrest_campaigns.php" hash="38e2c429abaaa4609d30f28622e5fc3f"/><file name="csrest_clients.php" hash="df11ce1c1fd5fd43980db42cb83a6fa3"/><file name="csrest_general.php" hash="b41685f38618cc1440e564516c475654"/><file name="csrest_lists.php" hash="42904680a424977d7c6f3211cf0d7a9c"/><file name="csrest_people.php" hash="ff2a14af7e171a11d73bef3d4995f512"/><file name="csrest_segments.php" hash="98a8230fb95a105dd4e8716703b64223"/><file name="csrest_subscribers.php" hash="b5ad794e2cc2f65a278a8aa9de4af7d7"/><file name="csrest_templates.php" hash="4c94511a505a868eef2f8109ca3c35d6"/><dir name="samples"><dir name="authentication"><file name="auth_with_api_key.php" hash="5ec2a621094c4ff7c63d06b00014d583"/><file name="auth_with_oauth.php" hash="1881f307872d1fae22997a4693ced780"/><file name="exchange_token.php" hash="b29bce7a2cbf4d0538291c742abd352c"/><file name="get_authorize_url.php" hash="dc9ad491d320f0bf25e74d59f6d78879"/><file name="refresh_token.php" hash="9eaa613ebdf734a0da3bcb6afaa8a114"/></dir><dir name="campaign"><file name="create.php" hash="7cace5fb8fa64bf9843ff4138e65a488"/><file name="create_from_template.php" hash="2d59abd0476c5a4d4afa4594a913fb5e"/><file name="delete.php" hash="b9c0ce00735296c81dc2b376351e59b5"/><file name="get_bounces.php" hash="e63004b9535c74168d046bed13c10ee3"/><file name="get_clicks.php" hash="d4a75e82cc91c74a4605cb5719c801ba"/><file name="get_email_client_usage.php" hash="968801d380b057b4a253c6d55b20bf0f"/><file name="get_lists_and_segments.php" hash="8283e6d7e5ee12105a50ddceff1cefb2"/><file name="get_opens.php" hash="b6da2a4cd3af5278493168781fc80b28"/><file name="get_recipients.php" hash="560f808c2bb5b433ba523a067a751c39"/><file name="get_spam.php" hash="55cc045f93fb475bb12e10e24bed37a7"/><file name="get_summary.php" hash="db9f98a6cf207fc1b8a322d6f15d13fd"/><file name="get_unsubscribes.php" hash="897b7b407415346d6482076cd89a1bfa"/><file name="send.php" hash="85bb1f021d464b5dae1019da173a9c2d"/><file name="send_preview.php" hash="425ecb43ca6c974afdcadc1c0140fecb"/><file name="unschedule.php" hash="f4b51b9d91319fc0dcf640069bc8b81f"/></dir><dir name="client"><file name="create.php" hash="d4e34488e72a454d10ae3bc79e8a1852"/><file name="delete.php" hash="4dfa7fbc0641f4c97c9571c323e01e42"/><file name="get.php" hash="e30ff3ec917a1f019cf9319fd80203c7"/><file name="get_campaigns.php" hash="5139c4f763462390ab3648491bc3ce97"/><file name="get_drafts.php" hash="cd154a7dc5a3cbda99e14e4979de18f7"/><file name="get_lists.php" hash="f8b61e9a7e7244d8d94e283c785c81f1"/><file name="get_lists_for_email.php" hash="91679cf9ccb9815d19cee585e580cf90"/><file name="get_scheduled.php" hash="bd1fc7c7030264815f262a374ae4dfbc"/><file name="get_segments.php" hash="9ad7613198b151342d83e8bef874e2d0"/><file name="get_suppressionlist.php" hash="314962a3e85372f6bfa2ea4ae35074d8"/><file name="get_templates.php" hash="3146ea361fc5be0ae0f8a9821a5feb34"/><file name="set_basics.php" hash="98039b7af3faf84b626ee366ad0edeb0"/><file name="set_monthly_billing.php" hash="b67954e6085b6cda0c059a49b18e20a4"/><file name="set_payg_billing.php" hash="77755bd6960a5bc9f0276496a4cb791c"/><file name="suppress.php" hash="a17c0f81479e6fa64d49976078b9c9ac"/><file name="transfer_credits.php" hash="a9cfdca1becd95c6ebd975058c6055e4"/><file name="unsuppress.php" hash="b4f1494c81c9869c4961fdfa4733bf70"/></dir><file name="external_session_url.php" hash="5bf6e297a0f7e89c778e950d2531d3bf"/><file name="get_apikey.php" hash="cc283a022ac18ac67ef9ad280f9a23fb"/><file name="get_billing_details.php" hash="6073b23fa1e84b9779b2aa2e9d8fc2fe"/><file name="get_clients.php" hash="b20c2e5198a38b5e50fe91a1a3716339"/><file name="get_countries.php" hash="23af5ecd7d9b14743a99347593e987b0"/><file name="get_systemdate.php" hash="eb3485e8b83d1d38976cbd8570b95522"/><file name="get_timezones.php" hash="2855d1b98db96fe522e27c352a105935"/><dir name="list"><file name="activate_webhook.php" hash="17ec7bb74b2e2da3d638b9e483b6ae28"/><file name="create.php" hash="738e2a658dd5941d3bdfdab07c078a5f"/><file name="create_custom_field.php" hash="b1e7f089a9b00d21e73ec4fe758af6c0"/><file name="create_webhook.php" hash="e821de62b441ace11b46161a3ae5209a"/><file name="deactivate_webhook.php" hash="d153c136a4ee945261bad3ce66e9374c"/><file name="delete.php" hash="92572bf0078d55f8456c0c7e7aa2cb4e"/><file name="delete_custom_field.php" hash="086650a0ef740d29e208fd7e8182a10c"/><file name="delete_webhook.php" hash="7067aeac2c4b6880d69454795cbcfbad"/><file name="get.php" hash="4b8396705575c96fdeaf08ad2b5a1aef"/><file name="get_active_subscribers.php" hash="456f5381e8811d7171dd74fb9d9f67dd"/><file name="get_bounced_subscribers.php" hash="9d9aeb4456a6e59561ae6e89dc3ba83c"/><file name="get_custom_fields.php" hash="2c088f883c3d93305dc76d0f8ae13cf9"/><file name="get_deleted_subscribers.php" hash="ce2fc9006eaa6527c76bba3ede040213"/><file name="get_segments.php" hash="ecadf038ad1edd7327f47c00d99f511a"/><file name="get_stats.php" hash="56c9468e409969b86f89d3b34520602d"/><file name="get_unconfirmed_subscribers.php" hash="7395a08ef11b6cdf396471421e4ce40e"/><file name="get_unsubscribed_subscribers.php" hash="66bc8f6b6f3191034d56337cbfbc4648"/><file name="get_webhooks.php" hash="a3adc3e61c664eae88480a1e42c4ec8f"/><file name="list_webhook_receiver.php" hash="12ca45146c050f341423f80acbe688aa"/><file name="test_webhook.php" hash="ee5569efaa7ec24498560dcb842a50cb"/><file name="update.php" hash="1fd75af0a7975b3a38a73ea095d267fd"/><file name="update_custom_field.php" hash="8d05d379ea6bd3db8d4eec414177484b"/><file name="update_field_options.php" hash="97fb9d35b78e33a68cdc88be9d6b180f"/></dir><dir name="segment"><file name="add_rule.php" hash="4b87e194823680eeda392a2a12445f36"/><file name="clear_rules.php" hash="ad8c883b280dc7c73df638107ab9319f"/><file name="create.php" hash="332e6ee2e110069eb55984ca73fb1c26"/><file name="delete.php" hash="dcf277ebd4665264f37807bb69618e0c"/><file name="get.php" hash="22d1aebff3e321eca1243addf1563c55"/><file name="get_subscribers.php" hash="6b47b867dbabfc90a44e139b65208b59"/><file name="update.php" hash="201e2cff97af8521d50e001d0d9022a8"/></dir><dir name="subscriber"><file name="add.php" hash="6de8788edde8991bf097f9a1fbb8ec7d"/><file name="delete.php" hash="a0ff8d2d8096215237a45ab64931e201"/><file name="get.php" hash="12f56877fab870f5d1661b9f0afc4493"/><file name="get_history.php" hash="51f1fd6a57f3a4f903b8a240e2abb90f"/><file name="import.php" hash="9544edc3198ab802d9c7a4bb5471a3d7"/><file name="unsubscribe.php" hash="6b090b33817947869bae9d7ea74219a4"/><file name="update.php" hash="184bb3b1135ba651a32fc5b1f803fbe3"/></dir><dir name="template"><file name="create.php" hash="ecf7ffc21aa8250302247aea9ce2141b"/><file name="delete.php" hash="8a5826132b22df8f10d98247a652b12b"/><file name="get.php" hash="918041b6be0700135e7888bbe52b9ae6"/><file name="update.php" hash="7f8bfe822a19e41d2650820fef85a4b4"/></dir></dir><dir name="tests"><file name="all_tests.php" hash="3fafbd947aa885d9056ed62e832ca61b"/><dir name="class_tests"><file name="response_tests.php" hash="ae5b4f541ac5bcba7a9417544d2156a9"/><file name="transport_test.php" hash="3033343417f283136c43d0bab77ac355"/></dir><file name="csrest_administrators_test.php" hash="77830067da14a226bfdc86b445f68f30"/><file name="csrest_campaigns_test.php" hash="ce68576c81c314dbdeba2b229903d865"/><file name="csrest_clients_test.php" hash="d3023b37bc3ebf222171606a100532d5"/><file name="csrest_lists_test.php" hash="533753c96477cad7598382c94e9a8937"/><file name="csrest_people_test.php" hash="72269f3d21caaf5648684da44b0ad319"/><file name="csrest_segments_test.php" hash="8079d88822231e0dae44e8c4ea6774eb"/><file name="csrest_subscribers_test.php" hash="8b6ec2dade2d5b59d8f27f7e32df049f"/><file name="csrest_template_test.php" hash="3645fc50d5e43da11fa1a2b496b692c4"/><file name="csrest_test.php" hash="5aa568368876a311d02f6d6168b2787d"/><dir name="responses"><file name="active_subscribers.json" hash="414033ce6952d88c0edd3c7b04d4f14e"/><file name="add_subscriber.json" hash="236507977b97832343c87955243068ad"/><file name="apikey.json" hash="4ca4132cc99f80bfc3d4a029a77a7a6e"/><file name="bounced_subscribers.json" hash="78c52687485c30c0fb031eb82e472fb3"/><file name="campaign_bounces.json" hash="55471525555dacee6ca1eb9ed5826cea"/><file name="campaign_clicks.json" hash="57d3357f4a0d8b55042a80e6d984e1ea"/><file name="campaign_listsandsegments.json" hash="a0d21dda2042a25b1266036b5d945f0c"/><file name="campaign_opens.json" hash="50c3052eebc922dfd0293498b5374ef0"/><file name="campaign_recipients.json" hash="be59c57f1f497669260f5124c13d109e"/><file name="campaign_spam.json" hash="48fa85397d6d8da1a685a94c404d14a9"/><file name="campaign_summary.json" hash="248d074230990e424dedb26afac895eb"/><file name="campaign_unsubscribes.json" hash="87d6b967ec28f8b3cd7845acc3ba0a16"/><file name="campaigns.json" hash="3b160d6e1a5de3e6163f2fffa502e4cb"/><file name="client_details.json" hash="964787a45923035cdd7330d4af13dfd9"/><file name="clients.json" hash="b243ae5d2f1b0686a6f45bbc262b1ad5"/><file name="countries.json" hash="7baa975380541216a7829128d4d7fb5b"/><file name="create_campaign.json" hash="61079127bd26d95434347f30803a85b2"/><file name="create_client.json" hash="0b5ea68aeecf1f61c8a00fb5d2b89104"/><file name="create_custom_field.json" hash="49b9878fd944fa8ea2f283a3d0b6576b"/><file name="create_list.json" hash="33b7d284c287fa44edb649234bc2ac6b"/><file name="create_list_webhook.json" hash="8a1c9ea0268a3a58d8f8fdaa4f159519"/><file name="create_segment.json" hash="6183146c3898ae281ea640e40fb5b3b0"/><file name="create_template.json" hash="9b1fcc1ae0925bd552cb23e364d48cca"/><file name="custom_api_error.json" hash="6be6c0df48a411fc54a5abf1d8502690"/><file name="custom_fields.json" hash="fe40aa43df15068516cdc6b7d9e2148c"/><file name="deleted_subscribers.json" hash="176235e9b24405ed329cc40a9ac5d1cd"/><file name="drafts.json" hash="8b36d3bf66ebb683b6926fcef95ae106"/><file name="import_subscribers.json" hash="3c7c7d85d510224197dc597d3a6cf585"/><file name="import_subscribers_partial_success.json" hash="4e1ff5c7b33a77d709530a31f544a22d"/><file name="list_details.json" hash="09d06afb7cd013e74fe615ddfd5a6799"/><file name="list_stats.json" hash="b8cd04e30e5e30862f005208997655de"/><file name="list_webhooks.json" hash="93194d66734e07372cac1b5c9c04f2b5"/><file name="lists.json" hash="0b7f8013e3e93a105a7a7d8c156daf4d"/><file name="listsforemail.json" hash="c7eb2e23b02883e0a0f9a9b2ca9bc94a"/><file name="oauth_exchange_token.json" hash="066a7e8a3b3bc58f7b54803f5a16faaa"/><file name="scheduled.json" hash="d7c9df96fbfa5bafb1e1cfc0643123b7"/><file name="segment_details.json" hash="c5e9d05870477f429728463af092ebe5"/><file name="segment_subscribers.json" hash="cf5cec4bc4e7970315ea929a0bd29ecd"/><file name="segments.json" hash="d2d9265fd87ed661cd65c9c96b31a2f0"/><file name="subscriber_details.json" hash="1c5733a762560ed1dc27449edea3c27f"/><file name="subscriber_history.json" hash="93d3efaa0f0373156146e9f3060ca855"/><file name="suppressionlist.json" hash="13fff3aeddf64804cf8d9232b79ab45b"/><file name="systemdate.json" hash="5f2f368919effd4c7d36bc11d42d8198"/><file name="template_details.json" hash="81fa02e23c0a9c00c55730956a2868b0"/><file name="templates.json" hash="64aca93871da82620071a26c818da4ce"/><file name="timezones.json" hash="ff9bbd7171fe05f5bace2fc8087953d0"/><file name="unsubscribed_subscribers.json" hash="0f7cec268e4241426a5c7dcc33ba99eb"/></dir></dir><file name=".gitignore" hash="1416491a3a84679680a343e7adf1f20d"/><file name=".travis.yml" hash="3f3c6ec40583a10d8ec8dfa89a2010e8"/></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>4.1.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>