Class: Worldline::Connect::SDK::V1::Domain::DisputeOutput
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::DisputeOutput
- Defined in:
- lib/worldline/connect/sdk/v1/domain/dispute_output.rb
Instance Attribute Summary collapse
-
#amount_of_money ⇒ Worldline::Connect::SDK::V1::Domain::AmountOfMoney
The current value of amount_of_money.
-
#contact_person ⇒ String
The current value of contact_person.
-
#creation_details ⇒ Worldline::Connect::SDK::V1::Domain::DisputeCreationDetail
The current value of creation_details.
-
#email_address ⇒ String
The current value of email_address.
-
#files ⇒ Array<Worldline::Connect::SDK::V1::Domain::HostedFile>
The current value of files.
-
#reference ⇒ Worldline::Connect::SDK::V1::Domain::DisputeReference
The current value of reference.
-
#reply_to ⇒ String
The current value of reply_to.
-
#request_message ⇒ String
The current value of request_message.
-
#response_message ⇒ String
The current value of response_message.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#amount_of_money ⇒ Worldline::Connect::SDK::V1::Domain::AmountOfMoney
Returns the current value of amount_of_money.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def amount_of_money @amount_of_money end |
#contact_person ⇒ String
Returns the current value of contact_person.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def contact_person @contact_person end |
#creation_details ⇒ Worldline::Connect::SDK::V1::Domain::DisputeCreationDetail
Returns the current value of creation_details.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def creation_details @creation_details end |
#email_address ⇒ String
Returns the current value of email_address.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def email_address @email_address end |
#files ⇒ Array<Worldline::Connect::SDK::V1::Domain::HostedFile>
Returns the current value of files.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def files @files end |
#reference ⇒ Worldline::Connect::SDK::V1::Domain::DisputeReference
Returns the current value of reference.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def reference @reference end |
#reply_to ⇒ String
Returns the current value of reply_to.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def reply_to @reply_to end |
#request_message ⇒ String
Returns the current value of request_message.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def @request_message end |
#response_message ⇒ String
Returns the current value of response_message.
25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 25 def @response_message end |
Instance Method Details
#from_hash(hash) ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 60 def from_hash(hash) super if hash.has_key? 'amountOfMoney' raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash @amount_of_money = Worldline::Connect::SDK::V1::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney']) end if hash.has_key? 'contactPerson' @contact_person = hash['contactPerson'] end if hash.has_key? 'creationDetails' raise TypeError, "value '%s' is not a Hash" % [hash['creationDetails']] unless hash['creationDetails'].is_a? Hash @creation_details = Worldline::Connect::SDK::V1::Domain::DisputeCreationDetail.new_from_hash(hash['creationDetails']) end if hash.has_key? 'emailAddress' @email_address = hash['emailAddress'] end if hash.has_key? 'files' raise TypeError, "value '%s' is not an Array" % [hash['files']] unless hash['files'].is_a? Array @files = [] hash['files'].each do |e| @files << Worldline::Connect::SDK::V1::Domain::HostedFile.new_from_hash(e) end end if hash.has_key? 'reference' raise TypeError, "value '%s' is not a Hash" % [hash['reference']] unless hash['reference'].is_a? Hash @reference = Worldline::Connect::SDK::V1::Domain::DisputeReference.new_from_hash(hash['reference']) end if hash.has_key? 'replyTo' @reply_to = hash['replyTo'] end if hash.has_key? 'requestMessage' @request_message = hash['requestMessage'] end if hash.has_key? 'responseMessage' @response_message = hash['responseMessage'] end end |
#to_h ⇒ Hash
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/worldline/connect/sdk/v1/domain/dispute_output.rb', line 46 def to_h hash = super hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil? hash['contactPerson'] = @contact_person unless @contact_person.nil? hash['creationDetails'] = @creation_details.to_h unless @creation_details.nil? hash['emailAddress'] = @email_address unless @email_address.nil? hash['files'] = @files.collect{|val| val.to_h} unless @files.nil? hash['reference'] = @reference.to_h unless @reference.nil? hash['replyTo'] = @reply_to unless @reply_to.nil? hash['requestMessage'] = @request_message unless @request_message.nil? hash['responseMessage'] = @response_message unless @response_message.nil? hash end |