Class: Khalti::Transaction
- Inherits:
-
Object
- Object
- Khalti::Transaction
- Defined in:
- lib/khalti/transaction.rb
Overview
Khalti Transaction API wrapper
Constant Summary collapse
- API_URL =
'https://khalti.com/api/merchant-transaction'
Class Method Summary collapse
Class Method Details
.all ⇒ Object
17 18 19 |
# File 'lib/khalti/transaction.rb', line 17 def self.all RequestHelper.get("#{API_URL}/") end |
.find(idx) ⇒ Object
11 12 13 14 15 |
# File 'lib/khalti/transaction.rb', line 11 def self.find(idx) raise Errors::BlankError, 'Ensure idx is not blank.' \ if idx.nil? || idx.strip.empty? RequestHelper.get("#{API_URL}/#{idx}/") end |