Class: SolidusBolt::Payments::VoidSyncService

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/solidus_bolt/payments/void_sync_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseService

call

Constructor Details

#initialize(payment:) ⇒ VoidSyncService

Returns a new instance of VoidSyncService.



8
9
10
11
# File 'app/services/solidus_bolt/payments/void_sync_service.rb', line 8

def initialize(payment:)
  @payment = payment
  super
end

Instance Attribute Details

#paymentObject (readonly)

Returns the value of attribute payment.



6
7
8
# File 'app/services/solidus_bolt/payments/void_sync_service.rb', line 6

def payment
  @payment
end

Instance Method Details

#callObject



13
14
15
# File 'app/services/solidus_bolt/payments/void_sync_service.rb', line 13

def call
  payment.void! unless payment.void?
end