Class: Worldline::Acquiring::SDK::V1::Domain::ApiRefundSummaryForResponse
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ApiRefundSummaryForResponse
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb
Instance Attribute Summary collapse
-
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses
The current value of references.
-
#refund_id ⇒ String
The current value of refund_id.
-
#retry_after ⇒ String
The current value of retry_after.
-
#status ⇒ String
The current value of status.
-
#status_timestamp ⇒ DateTime
The current value of status_timestamp.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses
Returns the current value of references.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb', line 19 def references @references end |
#refund_id ⇒ String
Returns the current value of refund_id.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb', line 19 def refund_id @refund_id end |
#retry_after ⇒ String
Returns the current value of retry_after.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb', line 19 def retry_after @retry_after end |
#status ⇒ String
Returns the current value of status.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb', line 19 def status @status end |
#status_timestamp ⇒ DateTime
Returns the current value of status_timestamp.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb', line 19 def @status_timestamp end |
Instance Method Details
#from_hash(hash) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb', line 42 def from_hash(hash) super if hash.has_key? 'references' raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash @references = Worldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses.new_from_hash(hash['references']) end if hash.has_key? 'refundId' @refund_id = hash['refundId'] end if hash.has_key? 'retryAfter' @retry_after = hash['retryAfter'] end if hash.has_key? 'status' @status = hash['status'] end if hash.has_key? 'statusTimestamp' @status_timestamp = DateTime.parse(hash['statusTimestamp']) end end |
#to_h ⇒ Hash
32 33 34 35 36 37 38 39 40 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb', line 32 def to_h hash = super hash['references'] = @references.to_h unless @references.nil? hash['refundId'] = @refund_id unless @refund_id.nil? hash['retryAfter'] = @retry_after unless @retry_after.nil? hash['status'] = @status unless @status.nil? hash['statusTimestamp'] = @status_timestamp.iso8601(3) unless @status_timestamp.nil? hash end |