Class: Ingenico::Connect::SDK::Domain::Payment::PaymentStatusOutput

Inherits:
Definitions::OrderStatusOutput show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/payment_status_output.rb

Overview

Instance Attribute Summary collapse

Attributes inherited from Definitions::OrderStatusOutput

#errors, #is_cancellable, #status_category, #status_code, #status_code_change_date_time

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#is_authorizedObject

true/false



15
16
17
# File 'lib/ingenico/connect/sdk/domain/payment/payment_status_output.rb', line 15

def is_authorized
  @is_authorized
end

#is_refundableObject

true/false



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

def is_refundable
  @is_refundable
end

Instance Method Details

#from_hash(hash) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/ingenico/connect/sdk/domain/payment/payment_status_output.rb', line 27

def from_hash(hash)
  super
  if hash.has_key?('isAuthorized')
    @is_authorized = hash['isAuthorized']
  end
  if hash.has_key?('isRefundable')
    @is_refundable = hash['isRefundable']
  end
end

#to_hObject



20
21
22
23
24
25
# File 'lib/ingenico/connect/sdk/domain/payment/payment_status_output.rb', line 20

def to_h
  hash = super
  add_to_hash(hash, 'isAuthorized', @is_authorized)
  add_to_hash(hash, 'isRefundable', @is_refundable)
  hash
end