mollie-api-go
mollie-api-go copied to clipboard
Optional Shipping address
Hi there, loving the library so far. Thank you!
Describe the bug I'm selling digital products, so there is no need for a shipping address. As far as I can tell the API reference for creating an order also tells me that the shipping address is optional.
The library however, requires a shipping address because the default zero value of a mollie.Order.ShippingAddress
is invalid when creating an order.
To Reproduce
- Install library in your project
- Create an order without setting the shipping address
- Acknowledge mollie returns an error telling you that the shipping address is invalid.
Expected behavior I should be able to create an order without shipping address.
Additional context I could work on a PR that makes the shipping address optional. Not requesting you to do the work, just merely wondering if I'm missing something 😄
This is an interesting one, I was under the impression that if the field is empty then when encoding json you would not get it.
I will try to reproduce it but if you have an idea on how to solve it, please go ahead.
Updated and included in changes to be tagger with v4