Exception: ChargeBee::APIError
- Defined in:
- lib/chargebee/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#api_error_code ⇒ Object
readonly
Returns the value of attribute api_error_code.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#http_body ⇒ Object
readonly
Returns the value of attribute http_body.
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
-
#http_status_code ⇒ Object
readonly
Returns the value of attribute http_status_code.
-
#json_obj ⇒ Object
readonly
Returns the value of attribute json_obj.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(http_code = nil, json_obj = nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(http_code = nil, json_obj = nil) ⇒ APIError
Returns a new instance of APIError.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/chargebee/errors.rb', line 20 def initialize(http_code=nil, json_obj = nil) super json_obj[:message] @json_obj = json_obj @http_status_code = http_code @type = json_obj[:type] @api_error_code = json_obj[:api_error_code] @param = json_obj[:param] #Deprecated attributes @error_code = json_obj[:error_code] @http_code = http_code @http_body = json_obj.to_s end |
Instance Attribute Details
#api_error_code ⇒ Object (readonly)
Returns the value of attribute api_error_code.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def api_error_code @api_error_code end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def error_code @error_code end |
#http_body ⇒ Object (readonly)
Returns the value of attribute http_body.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def http_body @http_body end |
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def http_code @http_code end |
#http_status_code ⇒ Object (readonly)
Returns the value of attribute http_status_code.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def http_status_code @http_status_code end |
#json_obj ⇒ Object (readonly)
Returns the value of attribute json_obj.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def json_obj @json_obj end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def param @param end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
16 17 18 |
# File 'lib/chargebee/errors.rb', line 16 def type @type end |