src/Api/MailingList.php
public function update(string $address, array $parameters = [])
    {
        Assert::stringNotEmpty($address);
        Assert::isArray($parameters);

        foreach ($parameters as $field => $value) {
            switch ($field) {
                case 'address':
                case 'name':
                case 'description':
                    Assert::stringNotEmpty($value);

                    break;
                case 'access_level':
                    Assert::oneOf($value, ['readonly', 'members', 'everyone']);

                    break;
            }
        }

        $response = $this->httpPut(sprintf('/v3/lists/%s', $address), $parameters);

        return $this->hydrateResponse($response, UpdateResponse::class);
    }
public function update(string $address, array $parameters = [])
    {
        Assert::stringNotEmpty($address);
        Assert::isArray($parameters);

        foreach ($parameters as $field => $value) {
            switch ($field) {
                case 'address':
                case 'name':
                case 'description':
                    Assert::stringNotEmpty($value);

                    break;
                case 'access_level':
                    Assert::oneOf($value, ['readonly', 'members', 'everyone']);

                    break;
            }
        }

        $response = $this->httpPut(sprintf('/v3/lists/%s', $address), $parameters);

        return $this->hydrateResponse($response, UpdateResponse::class);
    }
public function update ( string $ address , array $ parameters = [ ] ) { Assert :: stringNotEmpty ( $ address ) ; Assert :: isArray ( $ parameters ) ; foreach ( $ parameters as $ field => $ value ) { switch ( $ field ) { case 'address' : case 'name' : case 'description' : Assert :: stringNotEmpty ( $ value ) ; break ; case 'access_level' : Assert :: oneOf ( $ value , [ 'readonly' , 'members' , 'everyone' ] ) ; break ; } } $ response = $ this -> httpPut ( sprintf ( '/v3/lists/%s' , $ address ) , $ parameters ) ; return $ this -> hydrateResponse ( $ response , UpdateResponse :: class ) ; }
Updates a mailing list.

@param string $address    Address of the mailing list
@param array  $parameters Array of field => value pairs to update

@return UpdateResponse

@throws \Exception
Updates a mailing list .