Class: Insika::ProviderErrorClassifier::Classification

Inherits:
Data
  • Object
show all
Defined in:
lib/insika/provider_error_classifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



22
23
24
# File 'lib/insika/provider_error_classifier.rb', line 22

def kind
  @kind
end

#retry_afterObject (readonly)

Returns the value of attribute retry_after

Returns:

  • (Object)

    the current value of retry_after



22
23
24
# File 'lib/insika/provider_error_classifier.rb', line 22

def retry_after
  @retry_after
end

#retryableObject (readonly)

Returns the value of attribute retryable

Returns:

  • (Object)

    the current value of retryable



22
23
24
# File 'lib/insika/provider_error_classifier.rb', line 22

def retryable
  @retryable
end

Instance Method Details

#to_hObject

the additive envelope fields — compacted so a retry_after-less fatal never invents one.



25
26
27
# File 'lib/insika/provider_error_classifier.rb', line 25

def to_h
  { kind: kind, retryable: retryable, retry_after: retry_after }.compact
end