Cannot remove metadata entries with typed / builder update params
See original GitHub issueNote: I’ve noticed that with issuing authorizations and transactions but this might be happening with other objects as well.
To try and remove a metadata entry (currently set to "foo": "bar"
) I try the following:
authorization.update(AuthorizationUpdateParams.builder()
.putMetadata("foo", null)
.build());
However this does not seem to make any change to the object (the metadata entry is still there with the old value).
I tried calling .putMetadata("foo", "")
but the SDK rejects empty strings.
The workaround I found was to call:
authorization.update(AuthorizationUpdateParams.builder()
.putExtraParam("metadata[foo]", EmptyParam.EMPTY)
.build());
which worked.
Should it be possible to remove metadata entries with putMetadata
?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to delete an enum type value in postgres? - Stack Overflow
Looks good, but I am getting ERROR: cannot cast type unit_enum_old to unit_enum . Probably some cast is required additionally. I am 146%...
Read more >Metadata Types | Metadata API Developer Guide
Represents a text-based code structure of the settings and site components, such as pages, branding sets, and themes, that make up an Experience...
Read more >Metadata API Developer Guide
Metadata is data that describes other data. To understand how Salesforce defines metadata, contrast business data with Salesforce metadata.
Read more >Content Management API | Contentful
Deleting a space will remove all its resources, including content types, entries and assets. This action can not be undone.
Read more >Model Binding in ASP.NET Core | Microsoft Learn
Causes model binding to add a model state error if binding cannot ... For record types, validation and binding metadata on parameters is ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just a quick note that I was able to reproduce the issue. I have a fair idea of what causes this bug, but it’s going to be tricky to fix. We’ll post an update here when we’ve made some progress. Thanks for your patience!
This should be fixed in the latest version, v15.3.1.