Class: SpreeCmCommissioner::IntercityTaxiOrder::Update
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::IntercityTaxiOrder::Update
- Defined in:
- app/services/spree_cm_commissioner/intercity_taxi_order/update.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(params:) ⇒ Update
constructor
A new instance of Update.
Constructor Details
#initialize(params:) ⇒ Update
Returns a new instance of Update.
10 11 12 |
# File 'app/services/spree_cm_commissioner/intercity_taxi_order/update.rb', line 10 def initialize(params:) @params = ensure_parameters(params) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'app/services/spree_cm_commissioner/intercity_taxi_order/update.rb', line 4 def params @params end |
Class Method Details
.call(params:) ⇒ Object
6 7 8 |
# File 'app/services/spree_cm_commissioner/intercity_taxi_order/update.rb', line 6 def self.call(params:) new(params: params).call end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 |
# File 'app/services/spree_cm_commissioner/intercity_taxi_order/update.rb', line 14 def call order = find_order! order.update!(order_params) order end |