Class: Worldline::Connect::SDK::V1::Domain::PaymentStatusOutput

Inherits:
OrderStatusOutput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/payment_status_output.rb

Instance Attribute Summary collapse

Attributes inherited from OrderStatusOutput

#errors, #is_cancellable, #is_retriable, #provider_raw_output, #status_category, #status_code, #status_code_change_date_time

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#is_authorizedtrue/false

Returns the current value of is_authorized.

Returns:

  • (true/false)

    the current value of is_authorized



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

def is_authorized
  @is_authorized
end

#is_refundabletrue/false

Returns the current value of is_refundable.

Returns:

  • (true/false)

    the current value of is_refundable



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

def is_refundable
  @is_refundable
end

#three_d_secure_statusString

Returns the current value of three_d_secure_status.

Returns:

  • (String)

    the current value of three_d_secure_status



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

def three_d_secure_status
  @three_d_secure_status
end

Instance Method Details

#from_hash(hash) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/worldline/connect/sdk/v1/domain/payment_status_output.rb', line 32

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
  if hash.has_key? 'threeDSecureStatus'
    @three_d_secure_status = hash['threeDSecureStatus']
  end
end

#to_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
# File 'lib/worldline/connect/sdk/v1/domain/payment_status_output.rb', line 24

def to_h
  hash = super
  hash['isAuthorized'] = @is_authorized unless @is_authorized.nil?
  hash['isRefundable'] = @is_refundable unless @is_refundable.nil?
  hash['threeDSecureStatus'] = @three_d_secure_status unless @three_d_secure_status.nil?
  hash
end