Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a field state code which is necessary when capturing orders in the US.
Before this change, trying to use OrderCapture with country_code="us" would throw an error due to the missing stateCode.
After this change, the user can pass the state code along with the zip code, for example:
api.OrderCapture(zip_code="02215", state_code="MA")
The state code validator takes into account that all state codes should have two letters. state_code string is not case sensitive.
If no state code is specified, an empty string is passed, which does not affect non-US country codes.
It has been tested with US state codes, I am not aware if there are other countries for which IKEA requires state codes.
Closes #33