Skip to content
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 support for NullFieldList (starting with credit memos and invoices) #529

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

cgunther
Copy link
Contributor

@cgunther cgunther commented Apr 6, 2022

NullFieldList is used to either clear an existing value on update, or
avoid a default being applied on adding a record.

My use case only required support for credit memos and invoices, so I
started there, but this could likely be added to most records.

This was heavily inspired by @gmike11's work in #481, but that seems to
lump a bunch of changes together. This also solves #398.

Where #481 manipulated the XML request body to address that the
<platformCore:nullFieldList> needs to always use the platformCore
namespace, as opposed to the record's normal namespace (ie transSale
for invoice) as happens for any other field, I tried to address that on
the #to_record side.

NullFieldList is used to either clear an existing value on update, or
avoid a default being applied on adding a record.

My use case only required support for credit memos and invoices, so I
started there, but this could likely be added to most records.

This was heavily inspired by @gmike11's work in NetSweet#481, but that seems to
lump a bunch of changes together. This also solves NetSweet#398.

Where NetSweet#481 manipulated the XML request body to address that the
`<platformCore:nullFieldList>` needs to always use the `platformCore`
namespace, as opposed to the record's normal namespace (ie `transSale`
for invoice) as happens for any other field, I tried to address that on
the `#to_record` side.
@iloveitaly
Copy link
Member

Awesome change, as always!

@iloveitaly iloveitaly merged commit 6c81f30 into NetSweet:master Apr 7, 2022
@iloveitaly iloveitaly mentioned this pull request Apr 7, 2022
@cgunther cgunther deleted the null-field-list branch April 7, 2022 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants