コード例 #1
0
 private function prepareSenderAddress($client_number = 'null')
 {
     $settings = new DpdPolandConfiguration();
     $this->sender = array('address' => $settings->address, 'city' => $settings->city, 'company' => $settings->company_name, 'countryCode' => DpdPoland::POLAND_ISO_CODE, 'email' => $settings->email, 'fid' => $client_number, 'name' => $settings->name_surname, 'phone' => $settings->phone, 'postalCode' => DpdPoland::convertPostcode($settings->postcode));
 }
コード例 #2
0
 /**
  * Get available pickup time frames for a particular date
  * @return bool
  */
 public function getCourierTimeframes()
 {
     $settings = new DpdPolandConfiguration();
     $params = array('senderPlaceV1' => array('countryCode' => DpdPoland::POLAND_ISO_CODE, 'zipCode' => DpdPoland::convertPostcode($settings->postcode)));
     $result = $this->getCourierOrderAvailabilityV1($params);
     if (!isset($result['ranges']) && !self::$errors) {
         self::$errors[] = $this->l('Cannot get TimeFrames from webservices. Please check if sender\'s postal code is typed in correctly');
     }
     return isset($result['ranges']) ? $result['ranges'] : false;
 }