Sha256: 7c89f77436a9ca9ac1988c38c557ea9ac83b569712a3545b5593b1eb72fca04a
Contents?: true
Size: 552 Bytes
Versions: 5
Compression:
Stored size: 552 Bytes
Contents
module PagSeguro class Query < Transaction def initialize(email = nil, token = nil, transaction_code=nil) raise "Needs a transaction code" if transaction_code.blank? raise "Needs an email" if email.blank? raise "Needs a token" if token.blank? @data = transaction_data(email, token, transaction_code) end private def transaction_data(email, token, transaction_code) super(RestClient.get("#{PAGSEGURO_TRANSACTIONS_URL}/#{transaction_code}?email=#{email}&token=#{token}")) end end end
Version data entries
5 entries across 5 versions & 1 rubygems