class PagSeguro::TransactionRefund

Attributes

errors[R]
result[RW]

Result from request.

transaction_code[RW]

Set the transaction code. The transaction status must be: Paga (3), Disponível (4), Em disputa (5)

value[RW]

Set the refund value. Greater than 0.00 and less or equal than transaction value. If not informed, PagSeguro will assume the total transaction value.

Public Instance Methods

register(extra_params = {}) click to toggle source

Calls the PagSeguro webservice and register the refund. Return PagSeguro::TransactionRefund.

# File lib/pagseguro/transaction_refund.rb, line 22
def register(extra_params = {})
  response_request = Request.post("transactions/refunds", api_version, params.merge(extra_params))
  Response.new(response_request, self).serialize
end
update_attributes(attrs) click to toggle source
# File lib/pagseguro/transaction_refund.rb, line 31
def update_attributes(attrs)
  attrs.map { |name, value| send("#{name}=", value) }
end

Private Instance Methods

api_version() click to toggle source
# File lib/pagseguro/transaction_refund.rb, line 36
def api_version
  "v2"
end
params() click to toggle source
# File lib/pagseguro/transaction_refund.rb, line 40
def params
  RequestSerializer.new(self).to_params
end