mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-12 06:54:19 +01:00
11 lines
263 B
Ruby
11 lines
263 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Provides methods for admin set customer to order
|
||
|
class Cart::SetCustomerService
|
||
|
def call(order, user_id)
|
||
|
user = User.find(user_id)
|
||
|
order.update(statistic_profile_id: user.statistic_profile.id)
|
||
|
order.reload
|
||
|
end
|
||
|
end
|