Class: Worldline::Acquiring::SDK::V1::Domain::ApiTechnicalReversalRequest

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#operation_idString

Returns the current value of operation_id.

Returns:

  • (String)

    the current value of operation_id



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb', line 16

def operation_id
  @operation_id
end

#reasonString

Returns the current value of reason.

Returns:

  • (String)

    the current value of reason



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb', line 16

def reason
  @reason
end

#transaction_timestampDateTime

Returns the current value of transaction_timestamp.

Returns:

  • (DateTime)

    the current value of transaction_timestamp



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb', line 16

def transaction_timestamp
  @transaction_timestamp
end

Instance Method Details

#from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb', line 33

def from_hash(hash)
  super
  if hash.has_key? 'operationId'
    @operation_id = hash['operationId']
  end
  if hash.has_key? 'reason'
    @reason = hash['reason']
  end
  if hash.has_key? 'transactionTimestamp'
    @transaction_timestamp = DateTime.parse(hash['transactionTimestamp'])
  end
end

#to_hHash

Returns:

  • (Hash)


25
26
27
28
29
30
31
# File 'lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb', line 25

def to_h
  hash = super
  hash['operationId'] = @operation_id unless @operation_id.nil?
  hash['reason'] = @reason unless @reason.nil?
  hash['transactionTimestamp'] = @transaction_timestamp.iso8601(3) unless @transaction_timestamp.nil?
  hash
end