-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shipping option for insurance #43
base: main
Are you sure you want to change the base?
Add shipping option for insurance #43
Conversation
The amount should be in passed in cents to the API of MyParcel. |
…avido/myparcel-php-api into avido/feature-shipping-option-insurance
From the MyParcel API docs:
$parcel->insurance(50000)->onlyRecipient->signature(); Bit cumbersome and one or the other method might be forgotten. $parcel->insurance(50000); |
But only mandatory for NL therefore didn't set them internally |
Think this package will be used most for NL shipments, so it makes sense to set these internally, we could check if the recipients address is in NL? |
That's a risky assumption :) |
True, but I think it might be worth the little overhead. In my opinion you should always set the recipient first before calling any additional option methods, even though this is possible at the moment. |
Description
Insurance shipment option added.
Motivation and context
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here (if you write
fixes #num
or
closes #num
, the issue will be automatically closed when the pull is accepted.)How has this been tested?
Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply.Please, please, please, don't send your pull request until all of the boxes are ticked.
If you're unsure about any of these, don't hesitate to ask. We're here to help!