Class: SpreeCmCommissioner::UpdatePaymentGatewayStatus
- Inherits:
-
BaseInteractor
- Object
- BaseInteractor
- SpreeCmCommissioner::UpdatePaymentGatewayStatus
- Defined in:
- app/interactors/spree_cm_commissioner/update_payment_gateway_status.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
3 4 5 |
# File 'app/interactors/spree_cm_commissioner/update_payment_gateway_status.rb', line 3 def call update_gateway_statuses end |
#update_gateway_status(payment_number) ⇒ Object
7 8 9 10 11 12 |
# File 'app/interactors/spree_cm_commissioner/update_payment_gateway_status.rb', line 7 def update_gateway_status(payment_number) payment = Spree::Payment.find_by(number: payment_number) return unless payment payment.update_column(:gateway_status, true) # rubocop:disable Rails/SkipsModelValidations end |
#update_gateway_statuses ⇒ Object
14 15 16 17 18 |
# File 'app/interactors/spree_cm_commissioner/update_payment_gateway_status.rb', line 14 def update_gateway_statuses payment_numbers.each do |payment_number| update_gateway_status(payment_number) end end |