DrewM\MailChimp\MailChimp::new_batch PHP Méthode

new_batch() public méthode

Create a new instance of a Batch request. Optionally with the ID of an existing batch.
public new_batch ( string $batch_id = null ) : Batch
$batch_id string Optional ID of an existing batch, if you need to check its status for example.
Résultat Batch New Batch object.
    public function new_batch($batch_id = null)
    {
        return new Batch($this, $batch_id);
    }

Usage Example

Exemple #1
0
 public function testNewBatch()
 {
     $MC_API_KEY = getenv('MC_API_KEY');
     if (!$MC_API_KEY) {
         $this->markTestSkipped('No API key in ENV');
     }
     $MailChimp = new MailChimp($MC_API_KEY);
     $Batch = $MailChimp->new_batch();
     $this->assertInstanceOf('DrewM\\MailChimp\\Batch', $Batch);
 }