> ## Documentation Index
> Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Removed Ruby APIs

> Ruby classes and methods removed from Spree, and what replaced each one.

Code written for an older Spree release, or by a coding agent working from old examples, may call one of these APIs. It fails with a `NoMethodError` or `NameError`, and Ruby, the Rails console, RSpec and the Rails log add the replacement below to that error.

APIs that still work but print a deprecation warning are not listed here. They are in the upgrade guide for the release that deprecated them.

## Removed in Spree 6.0

See the [upgrade guide](https://spreecommerce.org/docs/developer/upgrades/5.6-to-6.0.md) for the reasons behind each change.

| Removed | Use instead |
| - | - |
| `Spree::Order#next` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Order#next!` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Order#state` | Orders have status (draft, placed, canceled). Carts have no status: completed\_at marks completion, and current\_checkout\_step says where checkout stands. |
| `Spree::Order#state=` | Status changes through workflows, for example Spree::Orders::Cancel. Carts have no status. |
| `Spree::Order#can_go_to_state?` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Order#restart_checkout_flow` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Order#contents` | Change cart items with Spree.cart\_add\_item\_workflow or Spree::Dependencies.cart\_upsert\_items\_workflow. |
| `Spree::Order#adjustments` | Adjustments are typed rows: tax\_lines, discounts and fees. |
| `Spree::Order#all_adjustments` | Adjustments are typed rows: tax\_lines, discounts and fees. |
| `Spree::Order#state_changes` | Status history is no longer stored. Subscribe to events instead (Spree::Subscriber). |
| `Spree::Cart#next` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Cart#next!` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Cart#state` | Orders have status (draft, placed, canceled). Carts have no status: completed\_at marks completion, and current\_checkout\_step says where checkout stands. |
| `Spree::Cart#state=` | Status changes through workflows, for example Spree::Orders::Cancel. Carts have no status. |
| `Spree::Cart#can_go_to_state?` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Cart#restart_checkout_flow` | Checkout has no state machine. Write cart fields in any order (Spree::Carts::Update, or the Store API cart endpoints), read cart.current\_checkout\_step and the cart requirements to see what is missing, and place the order with Spree::Dependencies.carts\_complete\_workflow\.constantize.call(cart: cart). |
| `Spree::Cart#contents` | Change cart items with Spree.cart\_add\_item\_workflow or Spree::Dependencies.cart\_upsert\_items\_workflow. |
| `Spree::Cart#adjustments` | Adjustments are typed rows: tax\_lines, discounts and fees. |
| `Spree::Cart#all_adjustments` | Adjustments are typed rows: tax\_lines, discounts and fees. |
| `Spree::Cart#state_changes` | Status history is no longer stored. Subscribe to events instead (Spree::Subscriber). |
| `Spree::Order.checkout_flow` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Order.checkout_steps` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Order.insert_checkout_step` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Order.remove_checkout_step` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Order.remove_transition` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Order.go_to_state` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Order.state_machine` | Spree 6 has no state machines. Records move between statuses through workflows. |
| `Spree::Order.multi_search` | Use search, or q\[search] in the Admin API. |
| `Spree::Cart.checkout_flow` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Cart.checkout_steps` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Cart.insert_checkout_step` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Cart.remove_checkout_step` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Cart.remove_transition` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Cart.go_to_state` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::Cart.state_machine` | Spree 6 has no state machines. Records move between statuses through workflows. |
| `Spree::Cart.multi_search` | Use search, or q\[search] in the Admin API. |
| `Spree::Order#line_item_adjustments` | Use line\_item\_tax\_lines and line\_item\_discounts. |
| `Spree::Order#shipment_adjustments` | Use fulfillment\_tax\_lines and fulfillment\_discounts. |
| `Spree::Order#return_authorizations` | Returns, exchanges and claims are their own records on the order: returns, exchanges, claims. |
| `Spree::Order#customer_returns` | Returns, exchanges and claims are their own records on the order: returns, exchanges, claims. |
| `Spree::Order#reimbursements` | Returns, exchanges and claims are their own records on the order: returns, exchanges, claims. |
| `Spree::Order::Checkout` | Checkout has no state machine. Add a checkout requirement with Spree::Checkout::Registry.add\_requirement, or a step with Spree::Checkout::Registry.register\_step, and run side effects of placing an order in an order.placed subscriber (Spree::Subscriber). |
| `Spree::OrderContents` | Change cart items with Spree.cart\_add\_item\_workflow or Spree::Dependencies.cart\_upsert\_items\_workflow. |
| `Spree::Adjustment` | Adjustments are typed rows: Spree::TaxLine, Spree::Discount and Spree::Fee. |
| `Spree::LineItem#adjustments` | Adjustments are typed rows: tax\_lines, discounts and fees. |
| `Spree::Fulfillment#adjustments` | Adjustments are typed rows: tax\_lines, discounts and fees. |
| `Spree::StateChange` | Status history is no longer stored. Subscribe to events instead (Spree::Subscriber). |
| `Spree::LogEntry` | Status history is no longer stored. Subscribe to events instead (Spree::Subscriber). |
| `Spree::Payment#state_changes` | Status history is no longer stored. Subscribe to events instead (Spree::Subscriber). |
| `Spree::Payment#log_entries` | Status history is no longer stored. Subscribe to events instead (Spree::Subscriber). |
| `Spree::Fulfillment#state_changes` | Status history is no longer stored. Subscribe to events instead (Spree::Subscriber). |
| `Spree::ReturnAuthorization` | Use Spree::Return, or Spree::Exchange when different items go out. |
| `Spree::CustomerReturn` | Use Spree::Return: receiving is a status on the same record. |
| `Spree::Reimbursement` | Refund a return with the Spree::Returns::Refund workflow. |
| `Spree::ReimbursementType` | Refund a return with the Spree::Returns::Refund workflow. |
| `Spree::ReturnItem` | Use Spree::ReturnLineItem, Spree::ExchangeLineItem or Spree::ClaimLineItem. |
| `Spree::Variant#price` | Prices are per currency: price\_in(currency).amount or amount\_in(currency). |
| `Spree::Variant#default_price` | Use price\_in(currency). |
| `Spree::Variant#currency` | Pass the currency you mean to price\_in(currency). |
| `Spree::Variant#display_price` | Use price\_in(currency).display\_amount for the base price, or, on a variant (product.default\_variant), price\_for(context).display\_amount for the price a customer pays including price lists. |
| `Spree::Variant#display_amount` | Use price\_in(currency).display\_amount for the base price, or, on a variant (product.default\_variant), price\_for(context).display\_amount for the price a customer pays including price lists. |
| `Spree::Variant#display_compare_at_price` | Use price\_in(currency).display\_compare\_at\_amount. |
| `Spree::Variant#price_including_vat_for` | Use price\_in(currency).amount: prices are charged as entered. |
| `Spree::Variant#has_default_price?` | Use prices.base\_prices.exists?(currency: currency). |
| `Spree::Variant#default_image` | Use primary\_media. |
| `Spree::Variant#primary_image` | Use primary\_media. |
| `Spree::Product#price` | Prices are per currency: price\_in(currency).amount or amount\_in(currency). |
| `Spree::Product#default_price` | Use price\_in(currency). |
| `Spree::Product#currency` | Pass the currency you mean to price\_in(currency). |
| `Spree::Product#display_price` | Use price\_in(currency).display\_amount for the base price, or, on a variant (product.default\_variant), price\_for(context).display\_amount for the price a customer pays including price lists. |
| `Spree::Product#display_amount` | Use price\_in(currency).display\_amount for the base price, or, on a variant (product.default\_variant), price\_for(context).display\_amount for the price a customer pays including price lists. |
| `Spree::Product#display_compare_at_price` | Use price\_in(currency).display\_compare\_at\_amount. |
| `Spree::Product#price_including_vat_for` | Use price\_in(currency).amount: prices are charged as entered. |
| `Spree::Product#has_default_price?` | Use prices.base\_prices.exists?(currency: currency). |
| `Spree::Product#default_image` | Use primary\_media. |
| `Spree::Product#primary_image` | Use primary\_media. |
| `Spree::Variant#price=` | Use set\_price(currency, amount). |
| `Spree::Variant#compare_at_price=` | Use set\_price(currency, amount, compare\_at\_amount). |
| `Spree::Product#price=` | Set prices on a variant: default\_variant.set\_price(currency, amount). |
| `Spree::Product#compare_at_price=` | Set prices on a variant: default\_variant.set\_price(currency, amount, compare\_at\_amount). |
| `Spree::Product#featured_image` | Use primary\_media. |
| `Spree::DefaultPrice` | Use variant.price\_in(currency) and variant.set\_price(currency, amount). |
| `Spree::VatPriceCalculation` | Use price\_in(currency).amount: prices include tax per market. |
| `Spree::Product.with_option` | Use with\_option\_value(option, value). |
| `Spree::Product.in_name` | Use search, or q\[search] in the Admin API. |
| `Spree::Product.in_name_or_keywords` | Use search, or q\[search] in the Admin API. |
| `Spree::Product.in_name_or_description` | Use search, or q\[search] in the Admin API. |
| `Spree::Product.with_ids` | Use where(id: ids). |
| `Spree::Product.add_search_scope` | Declare a plain Active Record scope. To filter by it through the Admin API (q\[...]), also register it with Spree.ransack.add\_scope(Spree::Product, :scope\_name). |
| `Spree::Product.multi_search` | Use search, or q\[search] in the Admin API. |
| `Spree::Variant.multi_search` | Use search, or q\[search] in the Admin API. |
| `Spree::OptionType#color?` | Use color\_swatch?. |
| `Spree::Category#set_store` | Nothing to call: a new category gets its store from its parent or the current store when it is saved. |
| `Spree::Category.for_taxonomy` | Use for\_store(taxonomy.store). It returns every category in that store, not one taxonomy. |
| `Spree::Store#admin_users` | Use users. |
| `Spree::Store#supported_shipping_zones` | Use countries\_with\_shipping\_coverage. |
| `Spree::Address#user_default_billing?` | Use is\_default\_billing?. |
| `Spree::Address#user_default_shipping?` | Use is\_default\_shipping?. |
| `Spree.searcher_class` | Use Spree.search\_provider. |
| `Spree::PermittedAttributes` | Add writable API attributes with Spree::Product.additional\_permitted\_attributes += \[...] inside Rails.application.config.to\_prepare (any model; always +=). |
| `Spree::Preference` | Preferences live on each model in a JSON preferences column. |
| `Spree::User` | Use Spree.customer\_class for customers and Spree.admin\_user\_class for staff. |
| `Spree::PromotionHandler::Page` | Apply the promotion with a coupon code, or make it automatic. |
| `Spree::Carts::Empty` | Remove items through the Store API cart items endpoints, or delete the cart with Spree.cart\_destroy\_service. |
| `Spree::Payments::Create` | Use the Store API payments endpoint, Spree::StoreCredits::Apply or Spree.gift\_card\_apply\_workflow. |
| `Spree::Report` | Use reporting queries for aggregates, or a Spree::Export subclass for CSV rows. |
| `Spree::ReportLineItem` | Use reporting queries for aggregates, or a Spree::Export subclass for CSV rows. |
| `Spree::ImageMethods` | Use Active Storage variants with cdn\_image\_url. |
| `Spree::Frontend` | The Rails storefront is gone. Build the storefront on the Store API (/api/v3/store), for example with the Next.js storefront and @spree/sdk. |
| `Spree::Backend` | The Rails admin is gone. The back office is the React Admin Dashboard on the Admin API (/api/v3/admin); extend it with dashboard plugins. |
| `Spree::Api::V2` | API v2 is gone. Use the Store API (/api/v3/store) or the Admin API (/api/v3/admin). |


## Related topics

- [Extending Spree without Ruby](https://spreecommerce.org/docs/developer/customization/extend-without-ruby.md)
- [Changelog](https://spreecommerce.org/docs/changelog.md)
- [Installing Spree](https://spreecommerce.org/docs/developer/getting-started/quickstart.md)
- [Upgrading to Spree 6.0](https://spreecommerce.org/docs/developer/upgrades/5.6-to-6.0.md)
- [Monetary amounts in the Admin API: prices, costs, formats](https://spreecommerce.org/docs/api-reference/admin-api/monetary-amounts.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.