Class: Nfe::Generated::Nfeio::ProcessingMetricsResponse

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/nfeio/processing_metrics_response.rb,
sig/nfe/generated/nfeio/processing_metrics_response.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProcessingMetricsResponse

Returns a new instance of ProcessingMetricsResponse.

Parameters:

  • total: (Integer)
  • total_error: (Integer)
  • total_success: (Integer)


13
# File 'sig/nfe/generated/nfeio/processing_metrics_response.rbs', line 13

def initialize: (?total: Integer, ?total_error: Integer, ?total_success: Integer) -> void

Instance Attribute Details

#totalObject (readonly)

Returns the value of attribute total

Returns:

  • (Object)

    the current value of total



9
10
11
# File 'lib/nfe/generated/nfeio/processing_metrics_response.rb', line 9

def total
  @total
end

#total_errorObject (readonly)

Returns the value of attribute total_error

Returns:

  • (Object)

    the current value of total_error



9
10
11
# File 'lib/nfe/generated/nfeio/processing_metrics_response.rb', line 9

def total_error
  @total_error
end

#total_successObject (readonly)

Returns the value of attribute total_success

Returns:

  • (Object)

    the current value of total_success



9
10
11
# File 'lib/nfe/generated/nfeio/processing_metrics_response.rb', line 9

def total_success
  @total_success
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:

  • (instance, nil)


10
11
12
13
14
15
16
17
18
# File 'lib/nfe/generated/nfeio/processing_metrics_response.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    total: payload["total"],
    total_error: payload["totalError"],
    total_success: payload["totalSuccess"],
  )
end

.newinstance

Parameters:

  • total: (Integer)
  • total_error: (Integer)
  • total_success: (Integer)

Returns:

  • (instance)


12
# File 'sig/nfe/generated/nfeio/processing_metrics_response.rbs', line 12

def self.new: (?total: Integer, ?total_error: Integer, ?total_success: Integer) -> instance