/** * populate and return soap request contents using AdminSoap helper classes to get the correct data format * @return Svea\AdminSoap\CancelOrderRowsRequest */ public function prepareRequest() { $this->validateRequest(); $orderRowNumbers = array(); foreach ($this->orderBuilder->rowsToCancel as $rowToCancel) { $orderRowNumbers[] = new \SoapVar($rowToCancel, XSD_LONG, null, null, 'long', "http://schemas.microsoft.com/2003/10/Serialization/Arrays"); } $soapRequest = new AdminSoap\CancelOrderRowsRequest(new AdminSoap\Authentication($this->orderBuilder->conf->getUsername($this->orderBuilder->orderType, $this->orderBuilder->countryCode), $this->orderBuilder->conf->getPassword($this->orderBuilder->orderType, $this->orderBuilder->countryCode)), $this->orderBuilder->conf->getClientNumber($this->orderBuilder->orderType, $this->orderBuilder->countryCode), new \SoapVar($orderRowNumbers, SOAP_ENC_OBJECT), AdminServiceRequest::CamelCaseOrderType($this->orderBuilder->orderType), $this->orderBuilder->orderId); // Example request to cancel rows 1 & 2 in order 349092 // //<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:dat="http://schemas.datacontract.org/2004/07/DataObjects.Admin.Service" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> // <soapenv:Header/> // <soapenv:Body> // <tem:CancelOrderRows> // <tem:request> // <dat:Authentication> // <dat:Password>sverigetest</dat:Password> // <dat:Username>sverigetest</dat:Username> // </dat:Authentication> // <dat:ClientId>79021</dat:ClientId> // <dat:OrderRowNumbers> // <arr:long>1</arr:long> // <arr:long>2</arr:long> // </dat:OrderRowNumbers> // <dat:OrderType>Invoice</dat:OrderType> // <dat:SveaOrderId>349092</dat:SveaOrderId> // </tem:request> // </tem:CancelOrderRows> // </soapenv:Body> //</soapenv:Envelope> return $soapRequest; }
/** * populate and return soap request contents using AdminSoap helper classes to get the correct data format * @return Svea\AdminSoap\UpdateOrderRowsRequest * @throws Svea\ValidationException */ public function prepareRequest($resendOrderWithFlippedPriceIncludingVat = false) { $this->validateRequest(); $this->priceIncludingVat = $this->determineVatFlag($this->orderBuilder->numberedOrderRows, $resendOrderWithFlippedPriceIncludingVat); $updatedOrderRows = $this->getAdminSoapNumberedOrderRowsFromBuilderOrderRowsUsingVatFlag($this->orderBuilder->numberedOrderRows, $this->priceIncludingVat); $soapRequest = new AdminSoap\UpdateOrderRowsRequest(new AdminSoap\Authentication($this->orderBuilder->conf->getUsername($this->orderBuilder->orderType, $this->orderBuilder->countryCode), $this->orderBuilder->conf->getPassword($this->orderBuilder->orderType, $this->orderBuilder->countryCode)), $this->orderBuilder->conf->getClientNumber($this->orderBuilder->orderType, $this->orderBuilder->countryCode), AdminServiceRequest::CamelCaseOrderType($this->orderBuilder->orderType), $this->orderBuilder->orderId, new \SoapVar($updatedOrderRows, SOAP_ENC_OBJECT)); return $soapRequest; }
/** * populate and return soap request contents using AdminSoap helper classes to get the correct data format * @return Svea\AdminSoap\DeliverOrderRowsRequest * @throws Svea\ValidationException */ public function prepareRequest() { $this->validateRequest(); foreach ($this->orderBuilder->rowsToDeliver as $rowToDeliver) { $this->rowNumbers[] = new \SoapVar($rowToDeliver, XSD_LONG, null, null, 'long', "http://schemas.microsoft.com/2003/10/Serialization/Arrays"); } $soapRequest = new AdminSoap\DeliverPartialRequest(new AdminSoap\Authentication($this->orderBuilder->conf->getUsername($this->orderBuilder->orderType, $this->orderBuilder->countryCode), $this->orderBuilder->conf->getPassword($this->orderBuilder->orderType, $this->orderBuilder->countryCode)), $this->orderBuilder->distributionType, new AdminSoap\OrderToDeliver($this->orderBuilder->conf->getClientNumber($this->orderBuilder->orderType, $this->orderBuilder->countryCode), AdminServiceRequest::CamelCaseOrderType($this->orderBuilder->orderType), $this->orderBuilder->orderId), $this->rowNumbers); return $soapRequest; }
/** * populate and return soap request contents * @return Svea\AdminSoap\CancelOrderRequest */ public function prepareRequest() { $this->validateRequest(); $soapRequest = new AdminSoap\CancelOrderRequest(new AdminSoap\Authentication($this->orderBuilder->conf->getUsername($this->orderBuilder->orderType, $this->orderBuilder->countryCode), $this->orderBuilder->conf->getPassword($this->orderBuilder->orderType, $this->orderBuilder->countryCode)), $this->orderBuilder->orderId, AdminServiceRequest::CamelCaseOrderType($this->orderBuilder->orderType), $this->orderBuilder->conf->getClientNumber($this->orderBuilder->orderType, $this->orderBuilder->countryCode)); return $soapRequest; }
/** * populate and return soap request contents using AdminSoap helper classes to get the correct data format * @return Svea\AdminSoap\DeliverOrderRequest */ public function prepareRequest() { $this->validateRequest(); $soapRequest = new AdminSoap\DeliverOrdersRequest(new AdminSoap\Authentication($this->orderBuilder->conf->getUsername($this->orderBuilder->orderType, $this->orderBuilder->countryCode), $this->orderBuilder->conf->getPassword($this->orderBuilder->orderType, $this->orderBuilder->countryCode)), $this->orderBuilder->distributionType, new AdminSoap\OrdersToDeliver(new AdminSoap\DeliverOrderInformation($this->orderBuilder->conf->getClientNumber($this->orderBuilder->orderType, $this->orderBuilder->countryCode), AdminServiceRequest::CamelCaseOrderType($this->orderBuilder->orderType), $this->orderBuilder->orderId))); return $soapRequest; }