postAtClient = $postAtClient; } /** * Get available postal services for the given countries. * * @param array $countries Array of ISO 3166 ALPHA-2 country codes. * * @throws PostAtException * * @return AllowedServicesResult */ public function getAllowedServicesForCountry(array $countries): AllowedServicesResult { $countries = new Countries($countries); $soapMethod = new GetAllowedServicesForCountry($this->postAtClient); return $soapMethod->call($countries); } /** * Generates a shipping label for the given package and chosen delivery type. * * The $shipmentRow parameter is an associative array of the delivery details: * * [ * 'row' => [ * 'PrinterObject' => [ * 'LabelFormatID' => '100x150', * 'LanguageID' => 'pdf', * 'PaperLayoutID' => '2xA5inA4' * ], * 'Number' => 'XEN-12345, * 'DeliveryServiceThirdPartyID' => 28, * etc... * ], * ] * * See the official Post.at SOAP API documentation for further details. * * @param array $shipmentRow * * @throws PostAtException * * @return mixed The raw SOAP API result containing ImportShipmentResult. * See the official Post.at SOAP API documentation for details. */ public function importShipment(array $shipmentRow) { $shipmentRow = new ShipmentRow($shipmentRow); $soapMethod = new ImportShipment($this->postAtClient); return $soapMethod->call($shipmentRow); } }