Class: Worldline::Acquiring::SDK::V1::Domain::ApiCaptureRequestForRefund
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ApiCaptureRequestForRefund
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb
Instance Attribute Summary collapse
-
#operation_id ⇒ String
The current value of operation_id.
-
#transaction_timestamp ⇒ DateTime
The current value of transaction_timestamp.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#operation_id ⇒ String
Returns the current value of operation_id.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 15 def operation_id @operation_id end |
#transaction_timestamp ⇒ DateTime
Returns the current value of transaction_timestamp.
15 16 17 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 15 def @transaction_timestamp end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 29 def from_hash(hash) super if hash.has_key? 'operationId' @operation_id = hash['operationId'] end if hash.has_key? 'transactionTimestamp' @transaction_timestamp = DateTime.parse(hash['transactionTimestamp']) end end |
#to_h ⇒ Hash
22 23 24 25 26 27 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 22 def to_h hash = super hash['operationId'] = @operation_id unless @operation_id.nil? hash['transactionTimestamp'] = @transaction_timestamp.iso8601(3) unless @transaction_timestamp.nil? hash end |