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.
-
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentReferences
The current value of references.
-
#terminal_data ⇒ Worldline::Acquiring::SDK::V1::Domain::TerminalData
The current value of terminal_data.
-
#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.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 19 def operation_id @operation_id end |
#references ⇒ Worldline::Acquiring::SDK::V1::Domain::PaymentReferences
Returns the current value of references.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 19 def references @references end |
#terminal_data ⇒ Worldline::Acquiring::SDK::V1::Domain::TerminalData
Returns the current value of terminal_data.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 19 def terminal_data @terminal_data end |
#transaction_timestamp ⇒ DateTime
Returns the current value of transaction_timestamp.
19 20 21 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 19 def end |
Instance Method Details
#from_hash(hash) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 39 def from_hash(hash) super if hash.has_key? 'operationId' @operation_id = hash['operationId'] 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::PaymentReferences.new_from_hash(hash['references']) end if hash.has_key? 'terminalData' raise TypeError, "value '%s' is not a Hash" % [hash['terminalData']] unless hash['terminalData'].is_a? Hash @terminal_data = Worldline::Acquiring::SDK::V1::Domain::TerminalData.new_from_hash(hash['terminalData']) end if hash.has_key? 'transactionTimestamp' = DateTime.parse(hash['transactionTimestamp']) end end |
#to_h ⇒ Hash
30 31 32 33 34 35 36 37 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb', line 30 def to_h hash = super hash['operationId'] = @operation_id unless @operation_id.nil? hash['references'] = @references.to_h unless @references.nil? hash['terminalData'] = @terminal_data.to_h unless @terminal_data.nil? hash['transactionTimestamp'] = .iso8601(3) unless .nil? hash end |