Class: Worldline::Connect::SDK::V1::Domain::CaptureStatusOutput

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/capture_status_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#is_refundabletrue/false

Returns the current value of is_refundable.

Returns:

  • (true/false)

    the current value of is_refundable



18
19
20
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 18

def is_refundable
  @is_refundable
end

#is_retriabletrue/false

Returns the current value of is_retriable.

Returns:

  • (true/false)

    the current value of is_retriable



18
19
20
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 18

def is_retriable
  @is_retriable
end

#provider_raw_outputArray<Worldline::Connect::SDK::V1::Domain::KeyValuePair>

Returns the current value of provider_raw_output.

Returns:



18
19
20
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 18

def provider_raw_output
  @provider_raw_output
end

#status_codeInteger

Returns the current value of status_code.

Returns:

  • (Integer)

    the current value of status_code



18
19
20
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 18

def status_code
  @status_code
end

#status_code_change_date_timeString

Returns the current value of status_code_change_date_time.

Returns:

  • (String)

    the current value of status_code_change_date_time



18
19
20
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 18

def status_code_change_date_time
  @status_code_change_date_time
end

Instance Method Details

#from_hash(hash) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 41

def from_hash(hash)
  super
  if hash.has_key? 'isRefundable'
    @is_refundable = hash['isRefundable']
  end
  if hash.has_key? 'isRetriable'
    @is_retriable = hash['isRetriable']
  end
  if hash.has_key? 'providerRawOutput'
    raise TypeError, "value '%s' is not an Array" % [hash['providerRawOutput']] unless hash['providerRawOutput'].is_a? Array
    @provider_raw_output = []
    hash['providerRawOutput'].each do |e|
      @provider_raw_output << Worldline::Connect::SDK::V1::Domain::KeyValuePair.new_from_hash(e)
    end
  end
  if hash.has_key? 'statusCode'
    @status_code = hash['statusCode']
  end
  if hash.has_key? 'statusCodeChangeDateTime'
    @status_code_change_date_time = hash['statusCodeChangeDateTime']
  end
end

#to_hHash

Returns:

  • (Hash)


31
32
33
34
35
36
37
38
39
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 31

def to_h
  hash = super
  hash['isRefundable'] = @is_refundable unless @is_refundable.nil?
  hash['isRetriable'] = @is_retriable unless @is_retriable.nil?
  hash['providerRawOutput'] = @provider_raw_output.collect{|val| val.to_h} unless @provider_raw_output.nil?
  hash['statusCode'] = @status_code unless @status_code.nil?
  hash['statusCodeChangeDateTime'] = @status_code_change_date_time unless @status_code_change_date_time.nil?
  hash
end