protected function fromJsonElement($elements)
 {
     parent::fromJsonElement($elements);
     if (isset($elements->product_configuration)) {
         $productConfiguration = new ProductConfigurationProperties();
         $this->product_configuration = $productConfiguration->fromJsonElement($elements->product_configuration);
     }
     return $this;
 }
Пример #2
0
 protected function fromJsonElement($elements)
 {
     parent::fromJsonElement($elements);
     unset($this->configurations);
     $this->configurations = [];
     if (isset($elements->configurations)) {
         foreach ($elements->configurations as $value) {
             $configs = new ProductConfigurationProperties();
             $this->configurations[] = $configs->fromJsonElement($value);
         }
     }
     return $this;
 }
 protected function fromJsonElement($elements)
 {
     parent::fromJsonElement($elements);
     if (isset($elements->plan)) {
         unset($this->plan);
         $plan = new PlanProperties();
         $plan->fromJsonElement($elements->plan);
         $this->plan = $plan;
     }
     if (isset($elements->client)) {
         $client = new ClientProperties();
         $client->fromJsonElement($elements->client);
         $this->client = $client;
     }
     if (isset($elements->client_products)) {
         unset($this->client_products);
         $this->client_products = [];
         foreach ($elements->client_products as $client_product) {
             $cProducts = new ClientProductProperties();
             $cProducts->fromJsonElement($client_product);
             $this->client_products[] = $cProducts;
         }
     }
     return $this;
 }