Class: Bcash::Api::TransactionResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/bcash/api/transaction_response.rb

Instance Attribute Summary

Attributes inherited from Response

#body, #code, #http_code, #success

Instance Method Summary collapse

Methods inherited from Response

#initialize, #messages, #success?

Constructor Details

This class inherits a constructor from Bcash::Api::Response

Instance Method Details

#errorsObject



3
4
5
# File 'lib/bcash/api/transaction_response.rb', line 3

def errors
  body['erro']
end

#messageObject



7
8
9
# File 'lib/bcash/api/transaction_response.rb', line 7

def message
  success ? '' : errors['descricao']
end

#transactionObject



11
12
13
# File 'lib/bcash/api/transaction_response.rb', line 11

def transaction
  success ? body['transacao'] : nil
end