Skip to content

Fix preserving null param values when calling v2 APIs#1758

Merged
jar-stripe merged 2 commits intobetafrom
jar/fix-null-params-in-v2
Jan 7, 2026
Merged

Fix preserving null param values when calling v2 APIs#1758
jar-stripe merged 2 commits intobetafrom
jar/fix-null-params-in-v2

Conversation

@jar-stripe
Copy link
Copy Markdown
Contributor

@jar-stripe jar-stripe commented Jan 6, 2026

Why?

A user reported that specifying null as a value in an input param hash was not working; the key/null value was being stripped from the params as the request was being built. This was likely the correct behavior for v1 APIs but in v2 null is a valid parameter value for many fields.

What?

  • adds semantics parameter to Util.objects_to_ids and changes Hash case to preserve nil values when semantics is v2
  • updates calls to Util.objects_to_ids to pass api mode as semantics
  • adds tests for objects_to_ids

See Also

go/j/RUN_DEVSDK-2126

Changelog

  • Nil input params are now preserved when calling V2 APIs. Add additional tests for nil when calling V2 services you do not accidentally include an unintentional nil value. V1 API calls are not affected (nil values are stripped from params hashes in V1).

@jar-stripe jar-stripe marked this pull request as ready for review January 6, 2026 22:34
@jar-stripe jar-stripe requested a review from a team as a code owner January 6, 2026 22:34
@jar-stripe jar-stripe requested review from prathmesh-stripe and removed request for a team January 6, 2026 22:34
@jar-stripe jar-stripe force-pushed the jar/fix-null-params-in-v2 branch from c8529ca to 2d255d7 Compare January 7, 2026 18:45
@jar-stripe jar-stripe changed the base branch from beta to master January 7, 2026 18:45
@jar-stripe jar-stripe changed the base branch from master to beta January 7, 2026 18:46
@jar-stripe jar-stripe force-pushed the jar/fix-null-params-in-v2 branch from 2d255d7 to 829258f Compare January 7, 2026 18:46
@jar-stripe jar-stripe merged commit bf9442b into beta Jan 7, 2026
15 checks passed
@jar-stripe jar-stripe deleted the jar/fix-null-params-in-v2 branch January 7, 2026 20:11
jar-stripe added a commit that referenced this pull request Jan 7, 2026
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