コード例 #1
0
ファイル: Customer.php プロジェクト: braising/stelo-for-wc
 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);
 }
コード例 #2
0
ファイル: Customer.php プロジェクト: gpupo/stelo-sdk
 public function getSchema()
 {
     return array_merge(parent::getSchema(), ['customerIdentity' => 'string', 'billingAddress' => 'object', 'shippingAddress' => 'object']);
 }