commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ItemShippingDetailsDraftModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $targets;
27 
28 
32  public function __construct(
34  ) {
35  $this->targets = $targets;
36  }
37 
44  public function getTargets()
45  {
46  if (is_null($this->targets)) {
48  $data = $this->raw(self::FIELD_TARGETS);
49  if (is_null($data)) {
50  return null;
51  }
52  $this->targets = ItemShippingTargetCollection::fromArray($data);
53  }
54 
55  return $this->targets;
56  }
57 
58 
63  {
64  $this->targets = $targets;
65  }
66 }