| 1 | <?php |
||
| 19 | class CreateCampaignResponse extends Response |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * |
||
| 23 | */ |
||
| 24 | const WARNING = 20001; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var integer |
||
| 28 | */ |
||
| 29 | protected $CreateCampaignResult; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $Xml; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * |
||
| 38 | */ |
||
| 39 | 2 | public function __construct() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritDoc} |
||
| 47 | */ |
||
| 48 | 2 | public function getCode() |
|
| 49 | { |
||
| 50 | 2 | if (self::SUCCESSFUL == $this->CreateCampaignResult && !empty($this->ErrorStr)) { |
|
| 51 | 1 | $code = self::WARNING; |
|
| 52 | } else { |
||
| 53 | 1 | $code = $this->CreateCampaignResult; |
|
| 54 | } |
||
| 55 | |||
| 56 | 2 | return $code; |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return string Xml |
||
| 61 | */ |
||
| 62 | 1 | public function getXml() |
|
| 66 | } |
||
| 67 |