Class: PagSeguro::TransactionCancellation
- Inherits:
-
Object
- Object
- PagSeguro::TransactionCancellation
- Includes:
- Extensions::MassAssignment
- Defined in:
- lib/pagseguro/transaction_cancellation.rb,
lib/pagseguro/transaction_cancellation/response.rb,
lib/pagseguro/transaction_cancellation/request_serializer.rb,
lib/pagseguro/transaction_cancellation/response_serializer.rb
Defined Under Namespace
Classes: RequestSerializer, Response, ResponseSerializer
Instance Attribute Summary collapse
-
#result ⇒ Object
Result from http request.
-
#transaction_code ⇒ Object
Set the transaction code.
Instance Method Summary collapse
-
#errors ⇒ Object
Errors object.
-
#register ⇒ Object
Calls the PagSeguro webservice and register the cancellation.
- #update_attributes(attrs) ⇒ Object
Methods included from Extensions::MassAssignment
Instance Attribute Details
#result ⇒ Object
Result from http request.
10 11 12 |
# File 'lib/pagseguro/transaction_cancellation.rb', line 10 def result @result end |
#transaction_code ⇒ Object
Set the transaction code. The transaction status must be: Aguardando pagamento or Em anĂ¡lise.
7 8 9 |
# File 'lib/pagseguro/transaction_cancellation.rb', line 7 def transaction_code @transaction_code end |
Instance Method Details
#errors ⇒ Object
Errors object.
20 21 22 |
# File 'lib/pagseguro/transaction_cancellation.rb', line 20 def errors @errors ||= Errors.new end |
#register ⇒ Object
Calls the PagSeguro webservice and register the cancellation. Returns PagSeguro::TransactionCancellation.
14 15 16 17 |
# File 'lib/pagseguro/transaction_cancellation.rb', line 14 def register response_request = Request.post("transactions/cancels", api_version, params) Response.new(response_request, self).serialize end |
#update_attributes(attrs) ⇒ Object
24 25 26 |
# File 'lib/pagseguro/transaction_cancellation.rb', line 24 def update_attributes(attrs) attrs.each { |name, value| send("#{name}=", value) } end |