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