Class: DefraRubyGovpay::Payment
- Defined in:
- lib/defra_ruby_govpay/payment.rb
Overview
The Payment class represents a payment object in the Govpay Integration. It contains methods to check refund status and details about the payment.
Instance Method Summary collapse
Methods inherited from Object
#initialize, #nil_value?, #string_reader, #to_ostruct
Constructor Details
This class inherits a constructor from DefraRubyGovpay::Object
Instance Method Details
#refund ⇒ Object
13 14 15 |
# File 'lib/defra_ruby_govpay/payment.rb', line 13 def refund refund_summary end |
#refundable?(amount_requested = 0) ⇒ Boolean
7 8 9 10 11 |
# File 'lib/defra_ruby_govpay/payment.rb', line 7 def refundable?(amount_requested = 0) refund.status == "available" && refund.amount_available > refund.amount_submitted && amount_requested <= refund.amount_available end |