Services¶
Client Service¶
Get Client¶
Get client by id. Client id is provided as parameter in URL path
1 2 3 4 5 | $request = new GetClientRequest($id); $response = $speedy->getClient($request); /** @var Client $client */ $client = $response->getClient(); |
Get Contract Clients¶
Get clients with same contract as logged user’s one, if any
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $request = new GetContractClientsRequest(); $response = $speedy->getContractClients($request); /** @var ArrayCollection $clients */ $clients = $response->getClients(); /** @var Model\Client $client */ $client = $clients->first(); $clientId = $client->getClientId(); $clientName = $client->getClientName(); $contractName = $client->getContractName(); /** @var Model\Address $address */ $address = $client->getAddress(); |
Shipment Service¶
Create Shipment¶
1 2 3 4 5 6 7 8 9 | $request = new CreateShipmentRequest( new ShipmentSender(), new ShipmentRecipient(), new ShipmentService(), new ShipmentContent(), new ShipmentPayment() ); $response = $speedy->createShipment($request); |
Cancel Shipment¶
1 2 | $request = new CancelShipmentRequest(); $response = $speedy->cancelShipment($request); |
Update Shipment¶
1 2 | $request = new UpdateShipmentRequest(); $response = $speedy->updateShipment($request); |
Shipment Information¶
Print Service¶
Print Service
Track And Trace Service¶
Track And Trace Service
Pickup¶
Pickup
Location Service¶
Location Service
Find Country¶
1 2 3 4 5 6 7 8 9 10 11 12 13 | $request = new FindCountry('Bulgaria'); /** @var FindCountryResponse $countries */ $response = $speedy->findCountry($request); /** @var ArrayCollection $countries */ $countries = $response->getCountries(); /** @var Model\Country $country */ $country = $countries->first(); $countryId = $country->getId(); // int 100 $countryName = $country->getName(); // string BULGARIA |