#Magic Mage

1 messages ยท Page 1 of 1 (latest)

versed roverBOT
severe halo
#

@candid timber let's chat here!

candid timber
#

Ok

#

Something seems to happen when I use these query params inside of SubscriptionService.CancelAsync()

#

perhaps it does not like those strings being empty?

severe halo
#

could you copy/paste that subscription ID so I don't mess up any of the characters when searching on my end?

#

@candid timber just making sure you saw my message since you appear to be offline

candid timber
#

ok

#

I am always set to invis to avoid people trying to scam on discord.

#

sub_1Mt7uCIGajkrXKj9DKCghRwm

severe halo
#

ah, looks like an error is being returned because of the blank/empty feedback. I recommend omitting the cancellation_details hash altogether if you're not passing any values for comment and feedback

candid timber
#

ah you can do that? I thought I could not because of the lack of an ? on the signature on the cancel options class.

#

So that might need to add the little ? to that details part.

severe halo
#

Yep, it's possible. Technically, all parameters for the subscription cancellation request are optional. The only bit that's required is the subscription ID

candid timber
#

ok

candid timber
#

I would hate to need to make the change manually ๐Ÿ˜….

severe halo
#

Not quite sure I follow your question.

candid timber
#

Basically can it be made to have the bot that opens pull requests to stripe.net to update that file to make CancelationDetails get the nullable annotation ??

#

(this is because to me when I see a property not marked as that I assume it's required, this is because for 99.9% of cases it actually is)

versed roverBOT
proper lotus
#

strings are always optional so we never add the ? for it right?

#

ultimately this API Request should absolutely not 5xx

candid timber
proper lotus
#

the point I am making is that, AFAIK, we never say anywhere ? for string parameters in stripe-dotnet

#

and likely never will

candid timber
#

Yeah

#

I was referring to make the SubscriptionCancellationDetailsOptions property in SubscriptionCancelOptions nullable though.

proper lotus
#

I don't disagree it'd be good. We added it for other scalar types like DateTime and decimal but we won't for strings

#

and really same, we never set ? for "hashes"

candid timber
#

oh

proper lotus
#

yeah we didn't really skip anything per se. Just that file is not automatically generated

candid timber
#

oh

proper lotus
#

there's likely a jira from me from 3.5 years ago saying "hey we should fix this" bumped every quarter

#

๐Ÿ˜น

candid timber
#

Well at least I did that task for you today ๐Ÿ˜….

proper lotus
#

Files automatically generated by our "AI" have

``` at the top
#

But really going to go and yell a bit, the fact that you hit this and had to do the PR yourself is a bit "ugh" :p

candid timber
#

I wonder why that file is not auto generated.

candid timber
#

I actually wonder though who does the reviews and merges though, and if the pr I opened can be ported to the beta as well (or if it should just start there) ๐Ÿ˜….

proper lotus
#

humans review and merge right now though we mostly trust the code generated (it's reviewed earlier in our process internally as part of real code changes to our API)

#

and your change is about a public feature so it definitely should go in the public library

candid timber
#

ok

#

So basically it will be in a new nuget.org release soon?

proper lotus
#

yes, when a human has reviewed and then merged/released. Might take a couple of days

candid timber
#

ok