Class: Chargify2::Call
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Chargify2::Call
show all
- Defined in:
- lib/chargify2/representations/call.rb
Defined Under Namespace
Classes: Request, Response
Instance Method Summary
collapse
Instance Method Details
#errors ⇒ Object
23
24
25
|
# File 'lib/chargify2/representations/call.rb', line 23
def errors
(response.result.errors || []).map {|e| Hashery::OpenCascade[e.symbolize_keys]}
end
|
#request ⇒ Object
11
12
13
|
# File 'lib/chargify2/representations/call.rb', line 11
def request
Request[self[:request] || {}]
end
|
#response ⇒ Object
15
16
17
|
# File 'lib/chargify2/representations/call.rb', line 15
def response
Response[self[:response] || {}]
end
|
#successful? ⇒ Boolean
19
20
21
|
# File 'lib/chargify2/representations/call.rb', line 19
def successful?
response.result.status_code.to_s == '200'
end
|