| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class SetAccountAttributesRequest extends BaseRequest |
||
| 9 | { |
||
| 10 | private $attributes; |
||
| 11 | |||
| 12 | public function __construct(AccountAttributes $attributes = NULL) |
||
| 13 | { |
||
| 14 | parent::__construct('put', '/?accountmeta=true'); |
||
| 15 | |||
| 16 | if ($attributes == NULL) |
||
| 17 | { |
||
| 18 | $attributes = new AccountAttributes; |
||
| 19 | } |
||
| 20 | |||
| 21 | $this->attributes = $attributes; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getAccountAttributes() |
||
| 25 | { |
||
| 26 | return $this->attributes; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function generateBody() |
||
| 30 | { |
||
| 31 | $xmlWriter = new \XMLWriter; |
||
| 32 | $xmlWriter->openMemory(); |
||
| 33 | $xmlWriter->startDocument("1.0", "UTF-8"); |
||
| 34 | $xmlWriter->startElementNS(NULL, "Account", Constants::MNS_XML_NAMESPACE); |
||
| 35 | $this->attributes->writeXML($xmlWriter); |
||
| 36 | $xmlWriter->endElement(); |
||
| 37 | $xmlWriter->endDocument(); |
||
| 38 | return $xmlWriter->outputMemory(); |
||
| 39 | } |
||
| 40 | |||
| 41 | public function generateQueryString() |
||
| 42 | { |
||
| 43 | return NULL; |
||
| 44 | } |
||
| 47 |