Class: CyberSourceMergedSpec::PullFundsRefund404ResponseException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- CyberSourceMergedSpec::PullFundsRefund404ResponseException
- Defined in:
- lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb
Overview
pullFundsRefund404Response class.
Instance Attribute Summary collapse
-
#id ⇒ String
A unique identification number to identify the submitted request.
-
#message ⇒ String
The detail message related to the status and reason listed above.
-
#reason ⇒ String
The reason of the status.
-
#submit_time_utc ⇒ String
Time of request in UTC.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ PullFundsRefund404ResponseException
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) ⇒ PullFundsRefund404ResponseException
The constructor.
42 43 44 45 46 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 42 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#id ⇒ String
A unique identification number to identify the submitted request. It is also appended to the endpoint of the resource.
15 16 17 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 15 def id @id end |
#message ⇒ String
The detail message related to the status and reason listed above. Possible values:
- The requested resource does not exist
37 38 39 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 37 def @message end |
#reason ⇒ String
The reason of the status. Possible values:
- NOT_FOUND
31 32 33 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 31 def reason @reason end |
#submit_time_utc ⇒ String
Time of request in UTC.
Format: YYYY-MM-DDThh:mm:ssZ
Example
2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57
p.m.).
The T separates the date and the time.
The Z indicates UTC.
25 26 27 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 25 def submit_time_utc @submit_time_utc end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
69 70 71 72 73 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 69 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, submit_time_utc: #{@submit_time_utc.inspect}, reason:"\ " #{@reason.inspect}, message: #{@message.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
62 63 64 65 66 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 62 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, submit_time_utc: #{@submit_time_utc}, reason: #{@reason},"\ " message: #{@message}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
51 52 53 54 55 56 57 58 59 |
# File 'lib/cyber_source_merged_spec/exceptions/pull_funds_refund404_response_exception.rb', line 51 def unbox(hash) return nil unless hash @id = hash.key?('id') ? hash['id'] : SKIP @submit_time_utc = hash.key?('submitTimeUtc') ? hash['submitTimeUtc'] : SKIP @reason = hash.key?('reason') ? hash['reason'] : SKIP @message = hash.key?('message') ? hash['message'] : SKIP end |