DivideBV / Postnl

Library to connect to PostNL's SOAP service called CIF
GNU General Public License v2.0
31 stars 40 forks source link

getSentDate not part of postnl class #49

Closed matthijs-neijenhuijs closed 7 years ago

matthijs-neijenhuijs commented 7 years ago

Why is getSentDate not part of postnl class? getDeliveryDate is available.

ameenross commented 7 years ago

Shouldn't it be getSentDate()? Send with a 'd' is actually a language error here.

matthijs-neijenhuijs commented 7 years ago

Yes it is Sent, sorry. In the title it was correct. But the question still remains?

slokhorst commented 7 years ago

The function is already implemented in the DeliveryDateClient class, but not in the main Postnl class. I don't know why.

You can still use it though, like so:

$request = new ComplexTypes\GetSentDateRequest(...);
$postnl->call('DeliveryDateClient', 'getSentDate', $request);
ameenross commented 7 years ago

The idea was to not implement a proxy function for each and every method of every client, only those that are regularly used. That's why I allowed for calling the client and method specifically.

matthijs-neijenhuijs commented 7 years ago

I think getSentDate is regularly used. You need this date, because its essential for sending a package. If you sent it on a different day, they cannot comply to your delivery date.

ameenross commented 7 years ago

Alright, pull request adding the function is welcomed.