Class: CyberSourceMergedSpec::DeactivatePlanException2Exception
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- CyberSourceMergedSpec::DeactivatePlanException2Exception
- Defined in:
- lib/cyber_source_merged_spec/exceptions/deactivate_plan_exception2_exception.rb
Overview
deactivatePlanException2 class.
Instance Attribute Summary collapse
-
#status ⇒ String
The status of the submitted transaction.
-
#submit_time_utc ⇒ String
Time of request in UTC.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ DeactivatePlanException2Exception
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) ⇒ DeactivatePlanException2Exception
The constructor.
29 30 31 32 33 |
# File 'lib/cyber_source_merged_spec/exceptions/deactivate_plan_exception2_exception.rb', line 29 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#status ⇒ String
The status of the submitted transaction. Possible values:
- NOT_FOUND
24 25 26 |
# File 'lib/cyber_source_merged_spec/exceptions/deactivate_plan_exception2_exception.rb', line 24 def status @status 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.
Returned by Cybersource for all services.
18 19 20 |
# File 'lib/cyber_source_merged_spec/exceptions/deactivate_plan_exception2_exception.rb', line 18 def submit_time_utc @submit_time_utc end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
53 54 55 56 |
# File 'lib/cyber_source_merged_spec/exceptions/deactivate_plan_exception2_exception.rb', line 53 def inspect class_name = self.class.name.split('::').last "<#{class_name} submit_time_utc: #{@submit_time_utc.inspect}, status: #{@status.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
47 48 49 50 |
# File 'lib/cyber_source_merged_spec/exceptions/deactivate_plan_exception2_exception.rb', line 47 def to_s class_name = self.class.name.split('::').last "<#{class_name} submit_time_utc: #{@submit_time_utc}, status: #{@status}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
38 39 40 41 42 43 44 |
# File 'lib/cyber_source_merged_spec/exceptions/deactivate_plan_exception2_exception.rb', line 38 def unbox(hash) return nil unless hash @submit_time_utc = hash.key?('submitTimeUtc') ? hash['submitTimeUtc'] : SKIP @status = hash.key?('status') ? hash['status'] : SKIP end |