Class: Nfe::Generated::Nfeio::BatchProcessResponse

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBatchProcessResponse

Returns a new instance of BatchProcessResponse.

Parameters:

  • created_at: (String)
  • input: (String, nil)
  • out_puts: (Array[OutPutResponse], nil)
  • status: (String, nil)
  • status_reason: (String, nil)
  • updated_at: (String, nil)


16
# File 'sig/nfe/generated/nfeio/batch_process_response.rbs', line 16

def initialize: (created_at: String, ?input: String?, ?out_puts: Array[OutPutResponse]?, ?status: String?, ?status_reason: String?, ?updated_at: String?) -> void

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



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

def created_at
  @created_at
end

#inputObject (readonly)

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



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

def input
  @input
end

#out_putsObject (readonly)

Returns the value of attribute out_puts

Returns:

  • (Object)

    the current value of out_puts



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

def out_puts
  @out_puts
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



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

def status
  @status
end

#status_reasonObject (readonly)

Returns the value of attribute status_reason

Returns:

  • (Object)

    the current value of status_reason



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

def status_reason
  @status_reason
end

#updated_atObject (readonly)

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



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

def updated_at
  @updated_at
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
19
20
21
# File 'lib/nfe/generated/nfeio/batch_process_response.rb', line 10

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

  new(
    created_at: payload["createdAt"],
    input: payload["input"],
    out_puts: (payload["outPuts"] || []).map { |e| OutPutResponse.from_api(e) },
    status: payload["status"],
    status_reason: payload["statusReason"],
    updated_at: payload["updatedAt"],
  )
end

.newinstance

Parameters:

  • created_at: (String)
  • input: (String, nil)
  • out_puts: (Array[OutPutResponse], nil)
  • status: (String, nil)
  • status_reason: (String, nil)
  • updated_at: (String, nil)

Returns:

  • (instance)


15
# File 'sig/nfe/generated/nfeio/batch_process_response.rbs', line 15

def self.new: (created_at: String, ?input: String?, ?out_puts: Array[OutPutResponse]?, ?status: String?, ?status_reason: String?, ?updated_at: String?) -> instance