Class: Chargify2::Call
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Chargify2::Call
- Defined in:
- lib/chargify2/representations/call.rb
Constant Summary collapse
- Request =
Class.new(Hashery::OpenCascade)
- Response =
Class.new(Hashery::OpenCascade)
Instance Method Summary collapse
Instance Method Details
#errors ⇒ Object
28 29 30 |
# File 'lib/chargify2/representations/call.rb', line 28 def errors (response.result.errors || []).map {|e| Hashery::OpenCascade[e.recursive_symbolize_keys]} end |
#request ⇒ Object
14 15 16 17 |
# File 'lib/chargify2/representations/call.rb', line 14 def request h = self[:request] || {} Request[h.recursive_symbolize_keys] end |
#response ⇒ Object
19 20 21 22 |
# File 'lib/chargify2/representations/call.rb', line 19 def response h = self[:response] || {} Response[h.recursive_symbolize_keys] end |
#successful? ⇒ Boolean
24 25 26 |
# File 'lib/chargify2/representations/call.rb', line 24 def successful? response.result.status_code.to_s == '200' end |