Class: Ingenico::Connect::SDK::Domain::Dispute::Dispute

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/dispute/dispute.rb

Direct Known Subclasses

DisputeResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#dispute_outputIngenico::Connect::SDK::Domain::Dispute::DisputeOutput

Returns the current value of dispute_output.

Returns:



18
19
20
# File 'lib/ingenico/connect/sdk/domain/dispute/dispute.rb', line 18

def dispute_output
  @dispute_output
end

#idString

Returns the current value of id.

Returns:

  • (String)

    the current value of id



18
19
20
# File 'lib/ingenico/connect/sdk/domain/dispute/dispute.rb', line 18

def id
  @id
end

#payment_idString

Returns the current value of payment_id.

Returns:

  • (String)

    the current value of payment_id



18
19
20
# File 'lib/ingenico/connect/sdk/domain/dispute/dispute.rb', line 18

def payment_id
  @payment_id
end

#statusString

Returns the current value of status.

Returns:

  • (String)

    the current value of status



18
19
20
# File 'lib/ingenico/connect/sdk/domain/dispute/dispute.rb', line 18

def status
  @status
end

#status_outputIngenico::Connect::SDK::Domain::Dispute::DisputeStatusOutput

Returns the current value of status_output.

Returns:



18
19
20
# File 'lib/ingenico/connect/sdk/domain/dispute/dispute.rb', line 18

def status_output
  @status_output
end

Instance Method Details

#from_hash(hash) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/ingenico/connect/sdk/domain/dispute/dispute.rb', line 41

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 = Ingenico::Connect::SDK::Domain::Dispute::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 = Ingenico::Connect::SDK::Domain::Dispute::DisputeStatusOutput.new_from_hash(hash['statusOutput'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

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