Class: SolidusBolt::Transactions::RefundService

Inherits:
BaseService show all
Defined in:
app/services/solidus_bolt/transactions/refund_service.rb

Instance Attribute Summary collapse

Attributes inherited from BaseService

#payment_method

Instance Method Summary collapse

Methods inherited from BaseService

call

Constructor Details

#initialize(transaction_reference:, amount:, currency:, payment_method:) ⇒ RefundService

Returns a new instance of RefundService.



8
9
10
11
12
13
# File 'app/services/solidus_bolt/transactions/refund_service.rb', line 8

def initialize(transaction_reference:, amount:, currency:, payment_method:)
  @transaction_reference = transaction_reference
  @amount = amount
  @currency = currency
  super
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



6
7
8
# File 'app/services/solidus_bolt/transactions/refund_service.rb', line 6

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency.



6
7
8
# File 'app/services/solidus_bolt/transactions/refund_service.rb', line 6

def currency
  @currency
end

#transaction_referenceObject (readonly)

Returns the value of attribute transaction_reference.



6
7
8
# File 'app/services/solidus_bolt/transactions/refund_service.rb', line 6

def transaction_reference
  @transaction_reference
end

Instance Method Details

#callObject



15
16
17
# File 'app/services/solidus_bolt/transactions/refund_service.rb', line 15

def call
  refund
end