Class: Ingenico::Direct::SDK::Domain::PaymentDetailsResponse
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::PaymentDetailsResponse
- Defined in:
- lib/ingenico/direct/sdk/domain/payment_details_response.rb
Instance Attribute Summary collapse
-
#hosted_checkout_specific_output ⇒ Ingenico::Direct::SDK::Domain::HostedCheckoutSpecificOutput
The current value of hosted_checkout_specific_output.
-
#id ⇒ String
The current value of id.
-
#operations ⇒ Array<Ingenico::Direct::SDK::Domain::OperationOutput>
The current value of operations.
-
#payment_output ⇒ Ingenico::Direct::SDK::Domain::PaymentOutput
The current value of payment_output.
-
#status ⇒ String
The current value of status.
-
#status_output ⇒ Ingenico::Direct::SDK::Domain::PaymentStatusOutput
The current value of status_output.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#hosted_checkout_specific_output ⇒ Ingenico::Direct::SDK::Domain::HostedCheckoutSpecificOutput
Returns the current value of hosted_checkout_specific_output.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 20 def hosted_checkout_specific_output @hosted_checkout_specific_output end |
#id ⇒ String
Returns the current value of id.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 20 def id @id end |
#operations ⇒ Array<Ingenico::Direct::SDK::Domain::OperationOutput>
Returns the current value of operations.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 20 def operations @operations end |
#payment_output ⇒ Ingenico::Direct::SDK::Domain::PaymentOutput
Returns the current value of payment_output.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 20 def payment_output @payment_output end |
#status ⇒ String
Returns the current value of status.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 20 def status @status end |
#status_output ⇒ Ingenico::Direct::SDK::Domain::PaymentStatusOutput
Returns the current value of status_output.
20 21 22 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 20 def status_output @status_output end |
Instance Method Details
#from_hash(hash) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 40 def from_hash(hash) super if hash.key? 'Operations' raise TypeError, "value '%s' is not an Array" % [hash['Operations']] unless hash['Operations'].is_a? Array @operations = [] hash['Operations'].each do |e| @operations << Ingenico::Direct::SDK::Domain::OperationOutput.new_from_hash(e) end end if hash.key? 'hostedCheckoutSpecificOutput' raise TypeError, "value '%s' is not a Hash" % [hash['hostedCheckoutSpecificOutput']] unless hash['hostedCheckoutSpecificOutput'].is_a? Hash @hosted_checkout_specific_output = Ingenico::Direct::SDK::Domain::HostedCheckoutSpecificOutput.new_from_hash(hash['hostedCheckoutSpecificOutput']) end @id = hash['id'] if hash.key? 'id' if hash.key? 'paymentOutput' raise TypeError, "value '%s' is not a Hash" % [hash['paymentOutput']] unless hash['paymentOutput'].is_a? Hash @payment_output = Ingenico::Direct::SDK::Domain::PaymentOutput.new_from_hash(hash['paymentOutput']) end @status = hash['status'] if hash.key? 'status' if hash.key? 'statusOutput' raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash @status_output = Ingenico::Direct::SDK::Domain::PaymentStatusOutput.new_from_hash(hash['statusOutput']) end end |
#to_h ⇒ Hash
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ingenico/direct/sdk/domain/payment_details_response.rb', line 29 def to_h hash = super hash['Operations'] = @operations.collect(&:to_h) if @operations hash['hostedCheckoutSpecificOutput'] = @hosted_checkout_specific_output.to_h if @hosted_checkout_specific_output hash['id'] = @id unless @id.nil? hash['paymentOutput'] = @payment_output.to_h if @payment_output hash['status'] = @status unless @status.nil? hash['statusOutput'] = @status_output.to_h if @status_output hash end |