Example #1
0
 protected function createJson()
 {
     $element = parent::createJson();
     if ($this->propertyExists('volume_type') && $this->getProperty('volume_type') instanceof VolumeType) {
         $element->volume->volume_type = $this->volume_type->name();
     }
     return $element;
 }
 public function createJson()
 {
     $json = parent::createJson();
     if ($this->getClient() instanceof Rackspace) {
         $json->user->username = $json->user->name;
         unset($json->user->name);
     }
     return $json;
 }