1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-07 01:54:16 +01:00
fab-manager/app/services/cart/set_customer_service.rb
2022-08-25 08:52:17 +02:00

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