Exemplo n.º 1
0
 public function __construct($data = null)
 {
     if ($data) {
         if (!array_key_exists('alias', $data['address'])) {
             $data['address'] = current($data['address']);
         }
         foreach ($this->conversion() as $old => $new) {
             if (array_key_exists($old, $data)) {
                 $data[$new] = $data[$old];
                 unset($data[$old]);
             }
         }
     }
     parent::__construct($data);
 }
Exemplo n.º 2
0
 public function getSchema()
 {
     return array_merge(parent::getSchema(), ['customerIdentity' => 'string', 'billingAddress' => 'object', 'shippingAddress' => 'object']);
 }