Class: Vpago::PaymentStatusMarker

Inherits:
Object
  • Object
show all
Defined in:
lib/vpago/payment_status_marker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payment, options = {}) ⇒ PaymentStatusMarker

:status, :description, :updated_by_user_id, updated_reason



6
7
8
9
10
# File 'lib/vpago/payment_status_marker.rb', line 6

def initialize(payment, options = {})
  @payment = payment
  @options = options
  @options[:status] = @options[:status] || false
end

Instance Attribute Details

#error_messageObject

Returns the value of attribute error_message.



3
4
5
# File 'lib/vpago/payment_status_marker.rb', line 3

def error_message
  @error_message
end

#paymentObject

Returns the value of attribute payment.



3
4
5
# File 'lib/vpago/payment_status_marker.rb', line 3

def payment
  @payment
end

Instance Method Details

#callObject



12
13
14
15
16
17
# File 'lib/vpago/payment_status_marker.rb', line 12

def call
  ActiveRecord::Base.transaction do
    update_payment_source
    update_payment_and_order
  end
end