Class: NuvemfiscalSdkRuby::NfcomApi
- Inherits:
-
Object
- Object
- NuvemfiscalSdkRuby::NfcomApi
- Defined in:
- lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#baixar_xml_cancelamento_nfcom(id, opts = {}) ⇒ File
Baixar XML do cancelamento.
-
#baixar_xml_cancelamento_nfcom_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML do cancelamento.
-
#baixar_xml_nfcom(id, opts = {}) ⇒ File
Baixar XML da NFCom processada Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ, complementado com a informação do protocolo de autorização de uso (TAG raiz ‘nfcomProc`).
-
#baixar_xml_nfcom_nota(id, opts = {}) ⇒ File
Baixar XML da NFCom Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ.
-
#baixar_xml_nfcom_nota_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML da NFCom Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ.
-
#baixar_xml_nfcom_protocolo(id, opts = {}) ⇒ File
Baixar XML do Protocolo da SEFAZ.
-
#baixar_xml_nfcom_protocolo_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML do Protocolo da SEFAZ.
-
#baixar_xml_nfcom_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML da NFCom processada Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ, complementado com a informação do protocolo de autorização de uso (TAG raiz `nfcomProc`).
-
#cancelar_nfcom(id, opts = {}) ⇒ DfeCancelamento
Cancelar uma NFCom autorizada **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
-
#cancelar_nfcom_with_http_info(id, opts = {}) ⇒ Array<(DfeCancelamento, Integer, Hash)>
Cancelar uma NFCom autorizada **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
-
#consultar_cancelamento_nfcom(id, opts = {}) ⇒ DfeCancelamento
Consultar o cancelamento da NFCom.
-
#consultar_cancelamento_nfcom_with_http_info(id, opts = {}) ⇒ Array<(DfeCancelamento, Integer, Hash)>
Consultar o cancelamento da NFCom.
-
#consultar_nfcom(id, opts = {}) ⇒ Dfe
Consultar NFCom Consulta os detalhes de uma NFCom já existente.
-
#consultar_nfcom_with_http_info(id, opts = {}) ⇒ Array<(Dfe, Integer, Hash)>
Consultar NFCom Consulta os detalhes de uma NFCom já existente.
-
#consultar_status_sefaz_nfcom(cpf_cnpj, opts = {}) ⇒ DfeSefazStatus
Consulta do Status do Serviço na SEFAZ Autorizadora Consulta do status do serviço prestado pelo Portal da Secretaria de Fazenda Estadual.
-
#consultar_status_sefaz_nfcom_with_http_info(cpf_cnpj, opts = {}) ⇒ Array<(DfeSefazStatus, Integer, Hash)>
Consulta do Status do Serviço na SEFAZ Autorizadora Consulta do status do serviço prestado pelo Portal da Secretaria de Fazenda Estadual.
-
#emitir_nfcom(body, opts = {}) ⇒ Dfe
Emitir NFCom **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
-
#emitir_nfcom_with_http_info(body, opts = {}) ⇒ Array<(Dfe, Integer, Hash)>
Emitir NFCom **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
-
#initialize(api_client = ApiClient.default) ⇒ NfcomApi
constructor
A new instance of NfcomApi.
-
#listar_nfcom(cpf_cnpj, ambiente, opts = {}) ⇒ DfeListagem
Listar NFCom Retorna a lista de NFCom de acordo com os critérios de busca utilizados.
-
#listar_nfcom_with_http_info(cpf_cnpj, ambiente, opts = {}) ⇒ Array<(DfeListagem, Integer, Hash)>
Listar NFCom Retorna a lista de NFCom de acordo com os critérios de busca utilizados.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#baixar_xml_cancelamento_nfcom(id, opts = {}) ⇒ File
Baixar XML do cancelamento
26 27 28 29 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 26 def baixar_xml_cancelamento_nfcom(id, opts = {}) data, _status_code, _headers = baixar_xml_cancelamento_nfcom_with_http_info(id, opts) data end |
#baixar_xml_cancelamento_nfcom_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML do cancelamento
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 35 def baixar_xml_cancelamento_nfcom_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.baixar_xml_cancelamento_nfcom ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NfcomApi.baixar_xml_cancelamento_nfcom" end # resource path local_var_path = '/nfcom/{id}/cancelamento/xml'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.baixar_xml_cancelamento_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#baixar_xml_cancelamento_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#baixar_xml_nfcom(id, opts = {}) ⇒ File
Baixar XML da NFCom processada Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ, complementado com a informação do protocolo de autorização de uso (TAG raiz ‘nfcomProc`). O XML só estará disponível nesse endpoint caso a nota tenha sido autorizada pela SEFAZ. Para obter o XML nos demais casos, utilize o endpoint `GET /nfcom/id/xml/nota`.
88 89 90 91 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 88 def baixar_xml_nfcom(id, opts = {}) data, _status_code, _headers = baixar_xml_nfcom_with_http_info(id, opts) data end |
#baixar_xml_nfcom_nota(id, opts = {}) ⇒ File
Baixar XML da NFCom Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ. O XML estará disponível nesse endpoint mesmo em casos que a nota tenha sido rejeitada.
151 152 153 154 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 151 def baixar_xml_nfcom_nota(id, opts = {}) data, _status_code, _headers = baixar_xml_nfcom_nota_with_http_info(id, opts) data end |
#baixar_xml_nfcom_nota_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML da NFCom Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ. O XML estará disponível nesse endpoint mesmo em casos que a nota tenha sido rejeitada.
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 161 def baixar_xml_nfcom_nota_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.baixar_xml_nfcom_nota ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NfcomApi.baixar_xml_nfcom_nota" end # resource path local_var_path = '/nfcom/{id}/xml/nota'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.baixar_xml_nfcom_nota", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#baixar_xml_nfcom_nota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#baixar_xml_nfcom_protocolo(id, opts = {}) ⇒ File
Baixar XML do Protocolo da SEFAZ
213 214 215 216 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 213 def baixar_xml_nfcom_protocolo(id, opts = {}) data, _status_code, _headers = baixar_xml_nfcom_protocolo_with_http_info(id, opts) data end |
#baixar_xml_nfcom_protocolo_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML do Protocolo da SEFAZ
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 222 def baixar_xml_nfcom_protocolo_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.baixar_xml_nfcom_protocolo ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NfcomApi.baixar_xml_nfcom_protocolo" end # resource path local_var_path = '/nfcom/{id}/xml/protocolo'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.baixar_xml_nfcom_protocolo", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#baixar_xml_nfcom_protocolo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#baixar_xml_nfcom_with_http_info(id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Baixar XML da NFCom processada Utilize esse endpoint para obter o XML da nota enviada para a SEFAZ, complementado com a informação do protocolo de autorização de uso (TAG raiz `nfcomProc`). O XML só estará disponível nesse endpoint caso a nota tenha sido autorizada pela SEFAZ. Para obter o XML nos demais casos, utilize o endpoint `GET /nfcom/id/xml/nota`.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 98 def baixar_xml_nfcom_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.baixar_xml_nfcom ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NfcomApi.baixar_xml_nfcom" end # resource path local_var_path = '/nfcom/{id}/xml'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.baixar_xml_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#baixar_xml_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#cancelar_nfcom(id, opts = {}) ⇒ DfeCancelamento
Cancelar uma NFCom autorizada **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
276 277 278 279 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 276 def cancelar_nfcom(id, opts = {}) data, _status_code, _headers = cancelar_nfcom_with_http_info(id, opts) data end |
#cancelar_nfcom_with_http_info(id, opts = {}) ⇒ Array<(DfeCancelamento, Integer, Hash)>
Cancelar uma NFCom autorizada **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 287 def cancelar_nfcom_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.cancelar_nfcom ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NfcomApi.cancelar_nfcom" end # resource path local_var_path = '/nfcom/{id}/cancelamento'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'DfeCancelamento' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.cancelar_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#cancelar_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#consultar_cancelamento_nfcom(id, opts = {}) ⇒ DfeCancelamento
Consultar o cancelamento da NFCom
344 345 346 347 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 344 def consultar_cancelamento_nfcom(id, opts = {}) data, _status_code, _headers = consultar_cancelamento_nfcom_with_http_info(id, opts) data end |
#consultar_cancelamento_nfcom_with_http_info(id, opts = {}) ⇒ Array<(DfeCancelamento, Integer, Hash)>
Consultar o cancelamento da NFCom
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 353 def consultar_cancelamento_nfcom_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.consultar_cancelamento_nfcom ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NfcomApi.consultar_cancelamento_nfcom" end # resource path local_var_path = '/nfcom/{id}/cancelamento'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DfeCancelamento' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.consultar_cancelamento_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#consultar_cancelamento_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#consultar_nfcom(id, opts = {}) ⇒ Dfe
Consultar NFCom Consulta os detalhes de uma NFCom já existente. Forneça o ID único obtido de uma requisição de emissão ou de listagem de NFCom e a Nuvem Fiscal irá retornar as informações da NFCom correspondente.
406 407 408 409 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 406 def consultar_nfcom(id, opts = {}) data, _status_code, _headers = consultar_nfcom_with_http_info(id, opts) data end |
#consultar_nfcom_with_http_info(id, opts = {}) ⇒ Array<(Dfe, Integer, Hash)>
Consultar NFCom Consulta os detalhes de uma NFCom já existente. Forneça o ID único obtido de uma requisição de emissão ou de listagem de NFCom e a Nuvem Fiscal irá retornar as informações da NFCom correspondente.
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 416 def consultar_nfcom_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.consultar_nfcom ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling NfcomApi.consultar_nfcom" end # resource path local_var_path = '/nfcom/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Dfe' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.consultar_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#consultar_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#consultar_status_sefaz_nfcom(cpf_cnpj, opts = {}) ⇒ DfeSefazStatus
Consulta do Status do Serviço na SEFAZ Autorizadora Consulta do status do serviço prestado pelo Portal da Secretaria de Fazenda Estadual. A Nuvem Fiscal mantém a última consulta em cache por 5 minutos, evitando sobrecarregar desnecessariamente os servidores da SEFAZ.
470 471 472 473 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 470 def consultar_status_sefaz_nfcom(cpf_cnpj, opts = {}) data, _status_code, _headers = consultar_status_sefaz_nfcom_with_http_info(cpf_cnpj, opts) data end |
#consultar_status_sefaz_nfcom_with_http_info(cpf_cnpj, opts = {}) ⇒ Array<(DfeSefazStatus, Integer, Hash)>
Consulta do Status do Serviço na SEFAZ Autorizadora Consulta do status do serviço prestado pelo Portal da Secretaria de Fazenda Estadual. A Nuvem Fiscal mantém a última consulta em cache por 5 minutos, evitando sobrecarregar desnecessariamente os servidores da SEFAZ.
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 481 def consultar_status_sefaz_nfcom_with_http_info(cpf_cnpj, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.consultar_status_sefaz_nfcom ...' end # verify the required parameter 'cpf_cnpj' is set if @api_client.config.client_side_validation && cpf_cnpj.nil? fail ArgumentError, "Missing the required parameter 'cpf_cnpj' when calling NfcomApi.consultar_status_sefaz_nfcom" end # resource path local_var_path = '/nfcom/sefaz/status' # query parameters query_params = opts[:query_params] || {} query_params[:'cpf_cnpj'] = cpf_cnpj query_params[:'autorizador'] = opts[:'autorizador'] if !opts[:'autorizador'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DfeSefazStatus' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.consultar_status_sefaz_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#consultar_status_sefaz_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#emitir_nfcom(body, opts = {}) ⇒ Dfe
Emitir NFCom **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
536 537 538 539 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 536 def emitir_nfcom(body, opts = {}) data, _status_code, _headers = emitir_nfcom_with_http_info(body, opts) data end |
#emitir_nfcom_with_http_info(body, opts = {}) ⇒ Array<(Dfe, Integer, Hash)>
Emitir NFCom **Informações adicionais**: - Cota: <a href="/docs/limites#dfe-eventos">dfe-eventos</a> - Consumo: 1 unidade por requisição.
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 546 def emitir_nfcom_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.emitir_nfcom ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NfcomApi.emitir_nfcom" end # resource path local_var_path = '/nfcom' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'Dfe' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.emitir_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#emitir_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#listar_nfcom(cpf_cnpj, ambiente, opts = {}) ⇒ DfeListagem
Listar NFCom Retorna a lista de NFCom de acordo com os critérios de busca utilizados. As NFCom são retornadas ordenadas pela data da criação, com as mais recentes aparecendo primeiro.
611 612 613 614 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 611 def listar_nfcom(cpf_cnpj, ambiente, opts = {}) data, _status_code, _headers = listar_nfcom_with_http_info(cpf_cnpj, ambiente, opts) data end |
#listar_nfcom_with_http_info(cpf_cnpj, ambiente, opts = {}) ⇒ Array<(DfeListagem, Integer, Hash)>
Listar NFCom Retorna a lista de NFCom de acordo com os critérios de busca utilizados. As NFCom são retornadas ordenadas pela data da criação, com as mais recentes aparecendo primeiro.
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/nuvemfiscal_sdk_ruby/api/nfcom_api.rb', line 628 def listar_nfcom_with_http_info(cpf_cnpj, ambiente, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NfcomApi.listar_nfcom ...' end # verify the required parameter 'cpf_cnpj' is set if @api_client.config.client_side_validation && cpf_cnpj.nil? fail ArgumentError, "Missing the required parameter 'cpf_cnpj' when calling NfcomApi.listar_nfcom" end # verify the required parameter 'ambiente' is set if @api_client.config.client_side_validation && ambiente.nil? fail ArgumentError, "Missing the required parameter 'ambiente' when calling NfcomApi.listar_nfcom" end # resource path local_var_path = '/nfcom' # query parameters query_params = opts[:query_params] || {} query_params[:'cpf_cnpj'] = cpf_cnpj query_params[:'ambiente'] = ambiente query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil? query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil? query_params[:'$inlinecount'] = opts[:'inlinecount'] if !opts[:'inlinecount'].nil? query_params[:'referencia'] = opts[:'referencia'] if !opts[:'referencia'].nil? query_params[:'chave'] = opts[:'chave'] if !opts[:'chave'].nil? query_params[:'serie'] = opts[:'serie'] if !opts[:'serie'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DfeListagem' # auth_names auth_names = opts[:debug_auth_names] || ['jwt', 'oauth2'] = opts.merge( :operation => :"NfcomApi.listar_nfcom", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NfcomApi#listar_nfcom\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |