Class: Unitpost::Result
- Inherits:
-
Struct
- Object
- Struct
- Unitpost::Result
- Defined in:
- lib/unitpost/errors.rb
Overview
Every SDK method returns one of these; exactly one of data/error is set.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#error ⇒ Object
Returns the value of attribute error.
Instance Method Summary collapse
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
24 25 26 |
# File 'lib/unitpost/errors.rb', line 24 def data @data end |
#error ⇒ Object
Returns the value of attribute error
24 25 26 |
# File 'lib/unitpost/errors.rb', line 24 def error @error end |
Instance Method Details
#success? ⇒ Boolean
25 26 27 |
# File 'lib/unitpost/errors.rb', line 25 def success? error.nil? end |