Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

namespace StripeCustomerUpdateSubscriptionOptions can not be found

I'm updating from stripe.net 1.2.0 dll

My original code was this
var myUpdatedSubscription = new StripeCustomerUpdateSubscriptionOptions(); but now I get no namespace not found error with the new stripe.net v7.

var myUpdatedSubscription = new StripeCustomerUpdateSubscriptionOptions();
                        myUpdatedSubscription.PlanId = SelectedSubscription;
                        myUpdatedSubscription.TokenId = stripeToken;
                        myUpdatedSubscription.Quantity = 1;

                        var customerService = new StripeCustomerService();
                        StripeSubscription subscription = customerService.UpdateSubscription(StripeCustomerID, myUpdatedSubscription);

                        objCompany.SubscribeCompany(CompanyID, StripeCustomerID, SelectedSubscription);
                        pnlForm.Visible = false;
                        pnlPaymentSuccessful.Visible = true;
like image 607
user713813 Avatar asked Jan 21 '26 05:01

user713813


1 Answers

Managing subscriptions has moved from the StripeCustomerService to the new StripeSubscriptionService. With this, the name of some of the types involved has changed, too. So, for example, instead of StripeCustomerUpdateSubscriptionOptions, you do now use StripeSubscriptionUpdateOptions.

like image 190
NineBerry Avatar answered Jan 23 '26 20:01

NineBerry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!