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

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

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



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

def is_authorized
  @is_authorized
end

#is_refundableObject

true/false



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

def is_refundable
  @is_refundable
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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



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

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