Class: CatarsePagarme::PaymentEngine
- Inherits:
-
Object
- Object
- CatarsePagarme::PaymentEngine
- Defined in:
- lib/catarse_pagarme/payment_engine.rb
Instance Method Summary collapse
- #can_do_refund? ⇒ Boolean
- #can_generate_second_slip? ⇒ Boolean
- #direct_refund(contribution) ⇒ Object
- #locale ⇒ Object
- #name ⇒ Object
- #review_path(contribution) ⇒ Object
- #second_slip_path(payment) ⇒ Object
- #transfer(contribution) ⇒ Object
Instance Method Details
#can_do_refund? ⇒ Boolean
14 15 16 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 14 def can_do_refund? true end |
#can_generate_second_slip? ⇒ Boolean
26 27 28 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 26 def can_generate_second_slip? true end |
#direct_refund(contribution) ⇒ Object
18 19 20 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 18 def direct_refund contribution contribution.pagarme_delegator.refund end |
#locale ⇒ Object
10 11 12 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 10 def locale 'pt' end |
#name ⇒ Object
3 4 5 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 3 def name 'Pagarme' end |
#review_path(contribution) ⇒ Object
7 8 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 7 def review_path contribution end |
#second_slip_path(payment) ⇒ Object
30 31 32 33 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 30 def second_slip_path(payment) # The second slip generates a new payment base on the contribution ID url_helpers.second_slip_pagarme_path(id: payment.contribution.id) end |
#transfer(contribution) ⇒ Object
22 23 24 |
# File 'lib/catarse_pagarme/payment_engine.rb', line 22 def transfer contribution contribution.pagarme_delegator.transfer_funds end |