示例#1
0
 public static function getAreas()
 {
     $data = new Address_getAreas();
     $data->setRef('7150813d-9b87-11de-822f-000c2965ae0e');
     $data->setPage(1);
     return Address::getAreas($data);
 }
 public function initData()
 {
     $this->initAreas(Address::getAreas()->data);
     $this->initCities(Address::getCities()->data);
     $this->initWarehouses(Address::getWarehouses()->data);
     $this->dateInit = new DateTime();
 }
示例#3
0
 public function initData()
 {
     Address::batch();
     $data = [Address::getAreas() => 'Areas', Address::getCities() => 'Cities', Address::getWarehouses() => 'Warehouses'];
     $result = Address::getResponseBatch();
     /** @var DataContainerResponse $itemResponse */
     foreach ($result as $key => $itemResponse) {
         if (!$itemResponse->success) {
             return;
         }
         $this->{'init' . $data[$key]}($itemResponse->data);
     }
     $this->dateInit = new DateTime();
 }