Sha256: 900d6798aea0c4a395768949909f5ce22dfff33497db226c632a09805b1610b3
Contents?: true
Size: 351 Bytes
Versions: 26
Compression:
Stored size: 351 Bytes
Contents
module Spree module Shipments class ChangeState prepend Spree::ServiceModule::Base def call(shipment:, state:) shipment.send("#{state}!") success(shipment.reload) rescue ActiveRecord::Rollback, ActiveRecord::RecordInvalid, StateMachines::InvalidTransition failure(shipment) end end end end
Version data entries
26 entries across 26 versions & 1 rubygems