Using the stripe API with Ruby on Rails I cannot save subscriptions.
I can retrieve and update and save client objects:
customer = Stripe::Customer.retrieve(some_customer_id)
I can also get subscriptions: subscription = customer.subscriptions.retrieve ("some_subscription_id") #this works
However, when trying to save a subscription: subscribe.save # this does not work
I keep getting the following:
NoMethodError: undefined method `save' for #<Stripe::StripeObject:0x007ff37147c720> from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/stripe- 1.9.9/lib/stripe/stripe_object.rb:158:in `method_missing'
Similarly, when trying to unsubscribe:
customer.subscriptions.retrieve("sub_3QM09lOz64QuSf").delete()
I get:
NoMethodError: undefined method `delete' for #<Stripe::StripeObject:0x007ff36d3f0d50> from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/stripe- 1.9.9/lib/stripe/stripe_object.rb:158:in `method_missing'
Without this, I cannot allow customers to cancel directly from the site.
What am I missing?
jco40 source share