Class: PayCertify::Insurance::Response

Inherits:
HashWithIndifferentAccess
  • Object
show all
Defined in:
lib/paycertify/insurance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



87
88
89
90
# File 'lib/paycertify/insurance.rb', line 87

def initialize(response)
  self.original_response = response
  super JSON.parse(response.body)
end

Instance Attribute Details

#original_responseObject

Returns the value of attribute original_response.



85
86
87
# File 'lib/paycertify/insurance.rb', line 85

def original_response
  @original_response
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/paycertify/insurance.rb', line 92

def success?
  original_response.status < 400
end