Class: Worldline::Acquiring::SDK::V1::Domain::ApiPaymentSummaryForResponse
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ApiPaymentSummaryForResponse
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/api_payment_summary_for_response.rb
Instance Attribute Summary collapse
-
#payment_id ⇒ String
The current value of payment_id.
-
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses
The current value of references.
-
#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
#payment_id ⇒ String
Returns the current value of payment_id.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_summary_for_response.rb', line 19 def payment_id @payment_id end |
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses
Returns the current value of references.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_summary_for_response.rb', line 19 def references @references end |
#retry_after ⇒ String
Returns the current value of retry_after.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_payment_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_payment_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_payment_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_payment_summary_for_response.rb', line 42 def from_hash(hash) super if hash.has_key? 'paymentId' @payment_id = hash['paymentId'] end 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? '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_payment_summary_for_response.rb', line 32 def to_h hash = super hash['paymentId'] = @payment_id unless @payment_id.nil? hash['references'] = @references.to_h unless @references.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 |