Correct abandoned_checkouts schema to correctly reflect some properties as arrays #44
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.
Before this change, I was unable to extract the abandoned checkouts stream because of JSONSchema validation errors. This fixes that such that the stream can be extracted!
note_attributes
is an array of objects with keys name and value. See https://help.shopify.com/en/api/reference/orders/order for docs on this property confusingly.line_items[x].applied_discounts
is also an array of objects. It's been superseded by thediscount_applications
field on the root level objects, but because it was specified in the schema as an object instead of an array records were failing schema validation. This will render those records valid, but not actually type and validate the properties of the field, which should keep the behaviour after this commit as similar as possible to the behaviour before.shipping_lines[x].custom_tax_lines
andshipping_lines[x].applied_discounts
get a similar treatment. Because they are supplied as arrays in the incoming data they need to be specified as such, but in order to not break anything and discourage using these deprecated fields, they aren't fully specified.