Closed bockhauzen closed 3 years ago
idea to drop the servicePointId parameter and replace it by arguments?
@bockhauzen Hey! Sorry for not getting back on this sooner. I forgot to watch this repository and only just now discovered about this pull request =S
If this is still desired, I'm more inclined to add the arguments as additional parameters so that user-error is less likely to occur. That's how the rest of the client is set up. It would then look something like:
public function getShippingMethods(?int $servicePointId = null, ?int $senderAddressId, ?bool $returnMethodsOnly = null): array
Would that work for you?
I'd still have to look into what the "all" option for "sender_address" exactly does. If it's the same as just plain leaving the option out then it's not necessary to implement in the client either.
Hi,
Woops, late reply as well.
I agree. That would def. be a cleaner solution. One other question;
There also seem to be an issue with: client->createLabel
When trying to use DE as country code it seems to fail.
Im trying to debug it, probaly my brains are just failing.
Thanks anyway for your response!
Update: There seems to be a difference between passing "all" and leaving the parameter out entirely. Not passing the parameter will use the default sender address. On my test account not passing the parameter yields 336 shipping methods and passing "all" yields 984. The latter takes over a solid half minute to complete. I'll probably have to increase the client's timeout over this.
Now you can also send the sender_address