stripe-go icon indicating copy to clipboard operation
stripe-go copied to clipboard

Provide a strongly-typed way of clearing fields on update

Open edutomesco opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I asked to support developers on Discord about how to disable the billing threshold from the SubscriptionSchedulePhaseItemParams struct. The documentation said you have to pass an empty string in order to disable it. I've tried to pass an empty SubscriptionSchedulePhaseItemParams struct or pass nil but it didn't work. Finally the solution they gave me is to set manually the empty string using the .AddExtra() method and pass it like this: phases[1][billing_thresholds]

Describe the solution you'd like

I would like to passing nil or the empty SubscriptionSchedulePhaseItemParams struct should disable the billing threshold.

Describe alternatives you've considered

No response

Additional context

No response

edutomesco avatar Oct 13 '22 14:10 edutomesco

We'll look into into strongly-typed ways of clearing fields.

pakrym-stripe avatar Feb 08 '23 15:02 pakrym-stripe