Mailjet\Client::put PHP Method

put() public method

Trigger a POST request
public put ( array $resource, array $args = [] ) : Response
$resource array Mailjet Resource/Action pair
$args array Request arguments
return Response
    public function put($resource, $args = [])
    {
        return $this->_call('PUT', $resource[0], $resource[1], $args);
    }

Usage Example

コード例 #1
0
 function it_should_create_a_contact(Client $client)
 {
     $this->create('list_name', '*****@*****.**', ['content' => 'baz', 'subject' => 'subject']);
     $client->post(Resources::$Contact, ['body' => ['Email' => '*****@*****.**']])->shouldBeCalled();
     $client->post(Resources::$Contactmetadata, ['body' => ['Datatype' => "str", 'Name' => "content_ListName", 'NameSpace' => "static"]])->shouldBeCalled();
     $client->post(Resources::$Contactmetadata, ['body' => ['Datatype' => "str", 'Name' => "subject_ListName", 'NameSpace' => "static"]])->shouldBeCalled();
     $client->put(Resources::$Contactdata, ['id' => '*****@*****.**', 'body' => ['Data' => [['Name' => "content_ListName", 'value' => 'baz'], ['Name' => "subject_ListName", 'value' => 'subject']]]])->shouldBeCalled();
 }
All Usage Examples Of Mailjet\Client::put