Class: PaymentMethod::BankTransfer
- Inherits:
-
PaymentMethod
- Object
- PaymentMethod
- PaymentMethod::BankTransfer
- Defined in:
- app/models/spree/payment_method/bank_transfer.rb
Instance Method Summary collapse
- #actions ⇒ Object
-
#can_capture?(payment) ⇒ Boolean
Indicates whether its possible to capture the payment.
-
#can_void?(payment) ⇒ Boolean
Indicates whether its possible to void the payment.
- #capture ⇒ Object
- #credit ⇒ Object
- #source_required? ⇒ Boolean
- #void ⇒ Object (also: #try_void)
Instance Method Details
#actions ⇒ Object
9 10 11 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 9 def actions %w[capture void credit] end |
#can_capture?(payment) ⇒ Boolean
Indicates whether its possible to capture the payment
14 15 16 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 14 def can_capture?(payment) %w[checkout pending].include?(payment.state) end |
#can_void?(payment) ⇒ Boolean
Indicates whether its possible to void the payment.
19 20 21 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 19 def can_void?(payment) payment.state != 'void' end |
#capture ⇒ Object
23 24 25 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 23 def capture(*) simulated_successful_billing_response end |
#credit ⇒ Object
32 33 34 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 32 def credit(*) simulated_successful_billing_response end |
#source_required? ⇒ Boolean
36 37 38 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 36 def source_required? false end |
#void ⇒ Object Also known as: try_void
27 28 29 |
# File 'app/models/spree/payment_method/bank_transfer.rb', line 27 def void(*) simulated_successful_billing_response end |