Class: Worldline::Connect::SDK::V1::Domain::Dispute

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/dispute.rb

Direct Known Subclasses

DisputeResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#dispute_outputWorldline::Connect::SDK::V1::Domain::DisputeOutput

Returns the current value of dispute_output.

Returns:



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 19

def dispute_output
  @dispute_output
end

#idString

Returns the current value of id.

Returns:

  • (String)

    the current value of id



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 19

def id
  @id
end

#payment_idString

Returns the current value of payment_id.

Returns:

  • (String)

    the current value of payment_id



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 19

def payment_id
  @payment_id
end

#statusString

Returns the current value of status.

Returns:

  • (String)

    the current value of status



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 19

def status
  @status
end

#status_outputWorldline::Connect::SDK::V1::Domain::DisputeStatusOutput

Returns the current value of status_output.

Returns:



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 19

def status_output
  @status_output
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
61
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 42

def from_hash(hash)
  super
  if hash.has_key? 'disputeOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['disputeOutput']] unless hash['disputeOutput'].is_a? Hash
    @dispute_output = Worldline::Connect::SDK::V1::Domain::DisputeOutput.new_from_hash(hash['disputeOutput'])
  end
  if hash.has_key? 'id'
    @id = hash['id']
  end
  if hash.has_key? 'paymentId'
    @payment_id = hash['paymentId']
  end
  if hash.has_key? 'status'
    @status = hash['status']
  end
  if hash.has_key? 'statusOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
    @status_output = Worldline::Connect::SDK::V1::Domain::DisputeStatusOutput.new_from_hash(hash['statusOutput'])
  end
end

#to_hHash

Returns:

  • (Hash)


32
33
34
35
36
37
38
39
40
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 32

def to_h
  hash = super
  hash['disputeOutput'] = @dispute_output.to_h unless @dispute_output.nil?
  hash['id'] = @id unless @id.nil?
  hash['paymentId'] = @payment_id unless @payment_id.nil?
  hash['status'] = @status unless @status.nil?
  hash['statusOutput'] = @status_output.to_h unless @status_output.nil?
  hash
end