Merge pull request #9973 from lcdservices/CRM-19469
[civicrm-core.git] / api / v3 / examples / Mailing / Submit.php
index fbf518322be9383b8692c2943a14662cd53d419f..ffaae8983dd93e0a0ea4cf2672a862a206b9fdd7 100644 (file)
@@ -9,7 +9,7 @@ function mailing_submit_example() {
   $params = array(
     'scheduled_date' => '2014-12-13 10:00:00',
     'approval_date' => '2014-12-13 00:00:00',
-    'id' => 16,
+    'id' => 18,
   );
 
   try{
@@ -21,7 +21,8 @@ function mailing_submit_example() {
     $errorCode = $e->getErrorCode();
     $errorData = $e->getExtraParams();
     return array(
-      'error' => $errorMessage,
+      'is_error' => 1,
+      'error_message' => $errorMessage,
       'error_code' => $errorCode,
       'error_data' => $errorData,
     );
@@ -42,23 +43,27 @@ function mailing_submit_expectedresult() {
     'is_error' => 0,
     'version' => 3,
     'count' => 1,
-    'id' => 16,
+    'id' => 18,
     'values' => array(
-      '16' => array(
-        'id' => '16',
+      '18' => array(
+        'id' => '18',
         'domain_id' => '1',
         'header_id' => '',
-        'footer_id' => '24',
+        'footer_id' => '27',
         'reply_id' => '8',
         'unsubscribe_id' => '5',
         'resubscribe_id' => '6',
         'optout_id' => '7',
         'name' => 'mailing name',
+        'mailing_type' => 'standalone',
         'from_name' => 'FIXME',
         'from_email' => 'info@EXAMPLE.ORG',
         'replyto_email' => 'info@EXAMPLE.ORG',
+        'template_type' => 'traditional',
+        'template_options' => '',
         'subject' => 'Hello {contact.display_name}',
         'body_text' => 'This is {contact.display_name}.
+https://civicrm.org
 {domain.address}{action.optOutUrl}',
         'body_html' => '<p>Look ma, magic tokens in the markup!</p>',
         'url_tracking' => '1',
@@ -68,11 +73,11 @@ function mailing_submit_expectedresult() {
         'is_completed' => '',
         'msg_template_id' => '',
         'override_verp' => '1',
-        'created_id' => '35',
+        'created_id' => '40',
         'created_date' => '2013-07-28 08:49:19',
-        'scheduled_id' => '36',
+        'scheduled_id' => '41',
         'scheduled_date' => '20130728085413',
-        'approver_id' => '36',
+        'approver_id' => '41',
         'approval_date' => '20130728085413',
         'approval_status_id' => '1',
         'approval_note' => '',
@@ -82,8 +87,9 @@ function mailing_submit_expectedresult() {
         'dedupe_email' => '1',
         'sms_provider_id' => '',
         'hash' => '67eac7789eaee00',
-        'location_type_id' => 0,
+        'location_type_id' => '',
         'email_selection_method' => 'automatic',
+        'language' => '',
       ),
     ),
   );