Class: Nfe::Operations::NfeCancel

Inherits:
Event
  • Object
show all
Defined in:
lib/nfe/operations/nfe_cancel.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:, date_time:, protocol:, reason:, use_schema: true) ⇒ NfeCancel

Returns a new instance of NfeCancel.



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

def initialize(certificate, private_key, environment:, nfe_key:,
  date_time:, protocol:, reason:, use_schema: true)

  @event = object_event(protocol, reason)

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

Instance Method Details

#canceled_xmlObject



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

def canceled_xml
  event_xml
end