Class: Worldline::Connect::SDK::V1::Domain::Dispute
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::Dispute
- Defined in:
- lib/worldline/connect/sdk/v1/domain/dispute.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#capture_id ⇒ String
The current value of capture_id.
-
#dispute_output ⇒ Worldline::Connect::SDK::V1::Domain::DisputeOutput
The current value of dispute_output.
-
#id ⇒ String
The current value of id.
-
#payment_id ⇒ String
The current value of payment_id.
-
#status ⇒ String
The current value of status.
-
#status_output ⇒ Worldline::Connect::SDK::V1::Domain::DisputeStatusOutput
The current value of status_output.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#capture_id ⇒ String
Returns the current value of capture_id.
20 21 22 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 20 def capture_id @capture_id end |
#dispute_output ⇒ Worldline::Connect::SDK::V1::Domain::DisputeOutput
Returns the current value of dispute_output.
20 21 22 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 20 def dispute_output @dispute_output end |
#id ⇒ String
Returns the current value of id.
20 21 22 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 20 def id @id end |
#payment_id ⇒ String
Returns the current value of payment_id.
20 21 22 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 20 def payment_id @payment_id end |
#status ⇒ String
Returns the current value of status.
20 21 22 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 20 def status @status end |
#status_output ⇒ Worldline::Connect::SDK::V1::Domain::DisputeStatusOutput
Returns the current value of status_output.
20 21 22 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 20 def status_output @status_output end |
Instance Method Details
#from_hash(hash) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 46 def from_hash(hash) super if hash.has_key? 'captureId' @capture_id = hash['captureId'] end 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_h ⇒ Hash
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute.rb', line 35 def to_h hash = super hash['captureId'] = @capture_id unless @capture_id.nil? 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 |