1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-12 06:54:19 +01:00
fab-manager/app/services/cart/set_customer_service.rb

11 lines
263 B
Ruby
Raw Normal View History

2022-08-25 08:52:17 +02:00
# 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