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_retriabletrue/false

Returns the current value of is_retriable.

Returns:

  • (true/false)

    the current value of is_retriable



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

def is_retriable
  @is_retriable
end

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

Returns the current value of provider_raw_output.

Returns:



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

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



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

def status_code
  @status_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/worldline/connect/sdk/v1/domain/capture_status_output.rb', line 33

def from_hash(hash)
  super
  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
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  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
end