class WebmaniabrNfeRuby::CancelNfe

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method WebmaniabrNfeRuby::ApiInterface::new
# File lib/webmaniabr_nfe_ruby/cancel_nfe.rb, line 3
def initialize(options = {})
  @key    = options[:key]
  @reason = options[:reason]

  super('nfe/cancelar')
end

Public Instance Methods

request() click to toggle source
# File lib/webmaniabr_nfe_ruby/cancel_nfe.rb, line 10
def request
  return process(method: 'PUT', params: {
    chave: @key,
    motivo: @reason
  })
end