Class: Veritrans::SnapResult

Inherits:
Result
  • Object
show all
Defined in:
lib/veritrans/result.rb

Instance Attribute Summary

Attributes inherited from Result

#data, #request_options, #response, #status, #time, #url

Instance Method Summary collapse

Methods inherited from Result

#body, #created?, #initialize, #inspect, #messages, #method_missing, #redirect_url, #status_message, #transaction_id

Constructor Details

This class inherits a constructor from Veritrans::Result

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Veritrans::Result

Instance Method Details

#status_codeObject



90
91
92
# File 'lib/veritrans/result.rb', line 90

def status_code
  @response.status.to_i
end

#success?Boolean

Returns:

  • (Boolean)


98
99
100
# File 'lib/veritrans/result.rb', line 98

def success?
  status_code == 200
end

#token_idObject



94
95
96
# File 'lib/veritrans/result.rb', line 94

def token_id
  @data[:token_id]
end