Class: Nfe::Operations::CorrectionLetter

Inherits:
Event
  • Object
show all
Defined in:
lib/nfe/operations/correction_letter.rb

Instance Attribute Summary

Attributes inherited from Base

#errors, #result

Instance Method Summary collapse

Methods inherited from Event

#event_xml, #message, #processed?, #protocol_number, #rejected?, #success?

Methods inherited from Base

#execute

Constructor Details

#initialize(certificate:, private_key:, environment:, nfe_key:, sequential:, date_time:, correction:, use_schema: true) ⇒ CorrectionLetter

Returns a new instance of CorrectionLetter.



6
7
8
9
10
11
12
13
# File 'lib/nfe/operations/correction_letter.rb', line 6

def initialize(certificate:, private_key:, environment:, nfe_key:,
  sequential:, date_time:, correction:, use_schema: true)

  @event = object_event(correction)

  super(certificate, private_key, environment, nfe_key, sequential,
    date_time, @event, use_schema: use_schema)
end

Instance Method Details

#correction_letter_xmlObject



15
16
17
# File 'lib/nfe/operations/correction_letter.rb', line 15

def correction_letter_xml
  event_xml
end