Class: Fondy::TransactionListResponse

Inherits:
BaseResponse show all
Defined in:
lib/fondy/transaction_list_response.rb

Instance Method Summary collapse

Methods inherited from BaseResponse

#error?, #initialize

Constructor Details

This class inherits a constructor from Fondy::BaseResponse

Instance Method Details

#error_codeObject



12
13
14
# File 'lib/fondy/transaction_list_response.rb', line 12

def error_code
  response[:error_code] if response.is_a?(Hash)
end

#error_messageObject



16
17
18
# File 'lib/fondy/transaction_list_response.rb', line 16

def error_message
  response[:error_message] if response.is_a?(Hash)
end

#success?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/fondy/transaction_list_response.rb', line 8

def success?
  response.is_a?(Array)
end

#transactionsObject



4
5
6
# File 'lib/fondy/transaction_list_response.rb', line 4

def transactions
  success? ? response : []
end