Class: Worldline::Acquiring::SDK::V1::Domain::DisputeEntry
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::DisputeEntry
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#documents ⇒ Array<Worldline::Acquiring::SDK::V1::Domain::DisputeDocument>
The current value of documents.
-
#elaboration ⇒ String
The current value of elaboration.
-
#entry_category ⇒ String
The current value of entry_category.
-
#entry_date_time ⇒ String
The current value of entry_date_time.
-
#entry_id ⇒ String
The current value of entry_id.
-
#entry_type ⇒ String
The current value of entry_type.
-
#entry_type_description ⇒ String
The current value of entry_type_description.
-
#message_text ⇒ String
The current value of message_text.
-
#questionnaire ⇒ String
The current value of questionnaire.
-
#response_due_date ⇒ Date
The current value of response_due_date.
-
#scheme_reason ⇒ String
The current value of scheme_reason.
-
#scheme_reason_description ⇒ String
The current value of scheme_reason_description.
-
#settlement_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
The current value of settlement_amount.
-
#transaction_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
The current value of transaction_amount.
-
#user_id ⇒ String
The current value of user_id.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#documents ⇒ Array<Worldline::Acquiring::SDK::V1::Domain::DisputeDocument>
Returns the current value of documents.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def documents @documents end |
#elaboration ⇒ String
Returns the current value of elaboration.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def elaboration @elaboration end |
#entry_category ⇒ String
Returns the current value of entry_category.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def entry_category @entry_category end |
#entry_date_time ⇒ String
Returns the current value of entry_date_time.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def entry_date_time @entry_date_time end |
#entry_id ⇒ String
Returns the current value of entry_id.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def entry_id @entry_id end |
#entry_type ⇒ String
Returns the current value of entry_type.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def entry_type @entry_type end |
#entry_type_description ⇒ String
Returns the current value of entry_type_description.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def entry_type_description @entry_type_description end |
#message_text ⇒ String
Returns the current value of message_text.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def end |
#questionnaire ⇒ String
Returns the current value of questionnaire.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def questionnaire @questionnaire end |
#response_due_date ⇒ Date
Returns the current value of response_due_date.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def response_due_date @response_due_date end |
#scheme_reason ⇒ String
Returns the current value of scheme_reason.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def scheme_reason @scheme_reason end |
#scheme_reason_description ⇒ String
Returns the current value of scheme_reason_description.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def scheme_reason_description @scheme_reason_description end |
#settlement_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
Returns the current value of settlement_amount.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def settlement_amount @settlement_amount end |
#transaction_amount ⇒ Worldline::Acquiring::SDK::V1::Domain::AmountData
Returns the current value of transaction_amount.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def transaction_amount @transaction_amount end |
#user_id ⇒ String
Returns the current value of user_id.
30 31 32 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 30 def user_id @user_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 83 def from_hash(hash) super if hash.has_key? 'documents' raise TypeError, "value '%s' is not an Array" % [hash['documents']] unless hash['documents'].is_a? Array @documents = [] hash['documents'].each do |e| @documents << Worldline::Acquiring::SDK::V1::Domain::DisputeDocument.new_from_hash(e) end end if hash.has_key? 'elaboration' @elaboration = hash['elaboration'] end if hash.has_key? 'entryCategory' @entry_category = hash['entryCategory'] end if hash.has_key? 'entryDateTime' @entry_date_time = hash['entryDateTime'] end if hash.has_key? 'entryId' @entry_id = hash['entryId'] end if hash.has_key? 'entryType' @entry_type = hash['entryType'] end if hash.has_key? 'entryTypeDescription' @entry_type_description = hash['entryTypeDescription'] end if hash.has_key? 'messageText' = hash['messageText'] end if hash.has_key? 'questionnaire' @questionnaire = hash['questionnaire'] end if hash.has_key? 'responseDueDate' @response_due_date = Date.parse(hash['responseDueDate']) end if hash.has_key? 'schemeReason' @scheme_reason = hash['schemeReason'] end if hash.has_key? 'schemeReasonDescription' @scheme_reason_description = hash['schemeReasonDescription'] end if hash.has_key? 'settlementAmount' raise TypeError, "value '%s' is not a Hash" % [hash['settlementAmount']] unless hash['settlementAmount'].is_a? Hash @settlement_amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['settlementAmount']) end if hash.has_key? 'transactionAmount' raise TypeError, "value '%s' is not a Hash" % [hash['transactionAmount']] unless hash['transactionAmount'].is_a? Hash @transaction_amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['transactionAmount']) end if hash.has_key? 'userId' @user_id = hash['userId'] end end |
#to_h ⇒ Hash
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/worldline/acquiring/sdk/v1/domain/dispute_entry.rb', line 63 def to_h hash = super hash['documents'] = @documents.collect{|val| val.to_h} unless @documents.nil? hash['elaboration'] = @elaboration unless @elaboration.nil? hash['entryCategory'] = @entry_category unless @entry_category.nil? hash['entryDateTime'] = @entry_date_time unless @entry_date_time.nil? hash['entryId'] = @entry_id unless @entry_id.nil? hash['entryType'] = @entry_type unless @entry_type.nil? hash['entryTypeDescription'] = @entry_type_description unless @entry_type_description.nil? hash['messageText'] = unless .nil? hash['questionnaire'] = @questionnaire unless @questionnaire.nil? hash['responseDueDate'] = @response_due_date.iso8601 unless @response_due_date.nil? hash['schemeReason'] = @scheme_reason unless @scheme_reason.nil? hash['schemeReasonDescription'] = @scheme_reason_description unless @scheme_reason_description.nil? hash['settlementAmount'] = @settlement_amount.to_h unless @settlement_amount.nil? hash['transactionAmount'] = @transaction_amount.to_h unless @transaction_amount.nil? hash['userId'] = @user_id unless @user_id.nil? hash end |