#Ajay479

1 messages ยท Page 1 of 1 (latest)

fossil ruinBOT
marble osprey
#

Hi there

#

Can you clarify what you are trying to do?

#

Looks like you are listing Subs by customer?

main raven
#

Yes that is what we are trying to do, we are getting a warning that the method we are using is deprecated

#

So I was wondering how we can achieve the same results without the customerId

marble osprey
#

Thanks for clarifying. One sec, let me grab latest state on this

main raven
#

Take your time, appreciate your help

#

It looks like the new method has list options that can take a customerid?

#

Would this return the same results?

public List<StripeSubscription> GetAllCustomerSubscriptions(string customerId) { var subscriptionService = new StripeSubscriptionService(); var listOptions = new StripeSubscriptionListOptions() { CustomerId = customerId }; return (List<StripeSubscription>) subscriptionService.List(listOptions); // optional StripeListOptions }

marble osprey
#

Ah yes I believe that's correct. What version are you using currently.

main raven
#

What is the best way to tell? I see version 10.0.0.0

livid bobcat
#

Hello ๐Ÿ‘‹
Stepping in
That's a quite old version of the library

#

So yes, the code you've shared above where you're passing customer ID in the SubscriptionListOptions should work
Have you had a chance to test the code yet? @main raven

main raven
#

I actually just tested it and it works as expected!

#

My team is also aware that we are using a very old version

livid bobcat
#

Perfect. Glad that it worked ๐Ÿ™‚

main raven
#

Thank you both for the help, hopefully you are not the hanzo that is always one tapping me

livid bobcat
#

Haha ๐Ÿ˜… I haven't played in a while so unlikely

#

We'll archive the thread soon but feel free to post in #dev-help should you have any questions ๐Ÿ™‚