Sha256: 56aac4e647ce50ebc5f8cd5c0dce04226db7e232d53102c238adbde335256298
Contents?: true
Size: 503 Bytes
Versions: 11
Compression:
Stored size: 503 Bytes
Contents
module PagarMe class Balance < PagarMeObject class << self def url(recipient_id = nil) if recipient_id "/recipients/#{recipient_id}/balance" else '/balance' end end def balance PagarMe::Request.get(url).call end def find_by_recipient_id(recipient_id = nil) raise RequestError.new('Invalid ID') unless recipient_id.present? PagarMe::Request.get(url recipient_id).call end end end end
Version data entries
11 entries across 11 versions & 1 rubygems