for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* Copyright (C) 2013-2016 Mailgun
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace Mailgun\Model\Suppression;
use Mailgun\Model\ApiResponse;
/**
* Serves only as an abstract base for Suppression API code.
* @author Sean Johnson <[email protected]>
abstract class BaseResponse implements ApiResponse
{
* @var string
private $address;
private $message;
* @param string $address
* @param string $message
private function __construct($address, $message)
$this->address = $address;
$this->message = $message;
}
* @param array $data
* @return BaseResponse
public static function create(array $data)
$address = isset($data['address']) ? $data['address'] : '';
$message = isset($data['message']) ? $data['message'] : '';
return new static($address, $message);
* @return string
public function getAddress()
return $this->address;
public function getMessage()
return $this->message;