Class: ApiReference::IdempotencyRequestMismatchException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- ApiReference::IdempotencyRequestMismatchException
- Defined in:
- lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb
Overview
IdempotencyRequestMismatch class.
Instance Attribute Summary collapse
-
#detail ⇒ String
TODO: Write general description for this method.
-
#status ⇒ Integer
readonly
TODO: Write general description for this method.
-
#title ⇒ String
TODO: Write general description for this method.
-
#type ⇒ String
readonly
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ IdempotencyRequestMismatchException
constructor
The constructor.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ IdempotencyRequestMismatchException
The constructor.
31 32 33 34 35 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 31 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#detail ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 22 def detail @detail end |
#status ⇒ Integer (readonly)
TODO: Write general description for this method
18 19 20 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 18 def status @status end |
#title ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 26 def title @title end |
#type ⇒ String (readonly)
TODO: Write general description for this method
14 15 16 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 14 def type @type end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
54 55 56 57 58 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 54 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, status: #{@status.inspect}, detail:"\ " #{@detail.inspect}, title: #{@title.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
48 49 50 51 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 48 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, status: #{@status}, detail: #{@detail}, title: #{@title}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
40 41 42 43 44 45 |
# File 'lib/api_reference/exceptions/idempotency_request_mismatch_exception.rb', line 40 def unbox(hash) return nil unless hash @detail = hash.key?('detail') ? hash['detail'] : SKIP @title = hash.key?('title') ? hash['title'] : SKIP end |