Skip to content

Migration guide for v8

Ramya Rao edited this page May 22, 2024 · 6 revisions

Deprecated

  • The save method is deprecated. Prefer the static update method that doesn't require retrieval of the resource to update it.
    # before
    refund = Stripe::Refund.retrieve("re_123")
    refund.description = "Refund description"
    refund.save
    
    # after
    Stripe::Refund.update("re_123", description: "Refund description")
    If you were using save to unset a parameter by assigning it a nil value, when switching to update please assign the parameter to an empty string "" to preserve the previous behavior.
    # before
    refund = Stripe::Refund.retrieve("re_123")
    refund.description = nil
    refund.save
    
    # after
    Stripe::Refund.update("re_123", description: "")

⚠️ Removed

  • Removed deprecated Sku resource.
  • Removed deprecated Orders resource.
  • Removed deprecated delete method on Subscription resource. Please use cancel method instead.
    # before
    Stripe::Subscription::delete("sub_12345")
    
    # after
    Stripe::Subscription::cancel("sub_12345")
Clone this wiki locally