Module: EnotasNfe::Endpoints
- Includes:
- Request
- Included in:
- Client
- Defined in:
- lib/enotas_nfe/endpoints.rb
Instance Method Summary
collapse
-
#cc_create(firm_id, body) ⇒ Object
rota para carta de correcao.
-
#create_update_empresa(body) ⇒ Object
-
#desabilitar_empresa(firm_id) ⇒ Object
-
#get_caracteristicas_prefeitura(codigo_ibge_cidade) ⇒ Object
-
#get_empresa(firm_id) ⇒ Object
-
#get_empresa_by_cnpj(cnpj) ⇒ Object
-
#get_empresas(pageNumber, pageSize) ⇒ Object
rotas para criaçacão/update e onfiguraçao da empresa.
-
#habilitar_empresa(firm_id) ⇒ Object
-
#nfce_create(firm_id, body) ⇒ Object
rotas para nota fiscal do consumidor eletronica.
-
#nfce_delete(firm_id, nfe_id) ⇒ Object
-
#nfce_get(firm_id, id) ⇒ Object
-
#nfe_create(firm_id, body) ⇒ Object
rotas para nota fiscal eletronica.
-
#nfe_delete(firm_id, nfe_id) ⇒ Object
-
#nfe_get(firm_id, id) ⇒ Object
-
#nfse_create(firm_id, body) ⇒ Object
-
#nfse_delete(firm_id, nfe_id) ⇒ Object
-
#nfse_delete_by_external_id(firm_id, external_id) ⇒ Object
-
#nfse_get(firm_id, id) ⇒ Object
-
#nfse_get_by_external_id(firm_id, external_id) ⇒ Object
-
#nfse_get_pdf(firm_id, id) ⇒ Object
-
#nfse_get_pdf_by_external_id(firm_id, external_id) ⇒ Object
-
#nfse_get_xml(firm_id, id) ⇒ Object
-
#nfse_get_xml_by_external_id(firm_id, external_id) ⇒ Object
-
#nfse_list(firm_id, body = {}) ⇒ Object
rotas para nota fiscal de serviço.
-
#set_certificado_digital(firm_id, body) ⇒ Object
-
#set_logo(firm_id, body) ⇒ Object
Methods included from Request
#delete, #get, #multipart_post, #post
Instance Method Details
#cc_create(firm_id, body) ⇒ Object
rota para carta de correcao
43
44
45
|
# File 'lib/enotas_nfe/endpoints.rb', line 43
def cc_create(firm_id, body)
post("empresas/#{firm_id}/nf-e/cartaCorrecao", body)
end
|
#create_update_empresa(body) ⇒ Object
18
19
20
|
# File 'lib/enotas_nfe/endpoints.rb', line 18
def create_update_empresa(body)
post("empresas", body)
end
|
#desabilitar_empresa(firm_id) ⇒ Object
34
35
36
|
# File 'lib/enotas_nfe/endpoints.rb', line 34
def desabilitar_empresa(firm_id)
post("empresas/#{firm_id}/desabilitar")
end
|
#get_caracteristicas_prefeitura(codigo_ibge_cidade) ⇒ Object
30
31
32
|
# File 'lib/enotas_nfe/endpoints.rb', line 30
def get_caracteristicas_prefeitura(codigo_ibge_cidade)
get("estados/cidades/#{codigo_ibge_cidade}/provedor")
end
|
#get_empresa(firm_id) ⇒ Object
10
11
12
|
# File 'lib/enotas_nfe/endpoints.rb', line 10
def get_empresa(firm_id)
get("empresas/#{firm_id}")
end
|
#get_empresa_by_cnpj(cnpj) ⇒ Object
14
15
16
|
# File 'lib/enotas_nfe/endpoints.rb', line 14
def get_empresa_by_cnpj(cnpj)
get("empresas?pageNumber=0&pageSize=1&searchBy=CNPJ&searchTerm=#{cnpj}")
end
|
#get_empresas(pageNumber, pageSize) ⇒ Object
rotas para criaçacão/update e onfiguraçao da empresa
6
7
8
|
# File 'lib/enotas_nfe/endpoints.rb', line 6
def get_empresas(pageNumber, pageSize)
get("empresas?pageNumber=#{pageNumber}&pageSize=#{pageSize}")
end
|
#habilitar_empresa(firm_id) ⇒ Object
38
39
40
|
# File 'lib/enotas_nfe/endpoints.rb', line 38
def habilitar_empresa(firm_id)
post("empresas/#{firm_id}/habilitar")
end
|
#nfce_create(firm_id, body) ⇒ Object
rotas para nota fiscal do consumidor eletronica
61
62
63
|
# File 'lib/enotas_nfe/endpoints.rb', line 61
def nfce_create(firm_id, body)
post("empresas/#{firm_id}/nfc-e", body)
end
|
#nfce_delete(firm_id, nfe_id) ⇒ Object
65
66
67
|
# File 'lib/enotas_nfe/endpoints.rb', line 65
def nfce_delete(firm_id, nfe_id)
delete("empresas/#{firm_id}/nfc-e/#{nfe_id}")
end
|
#nfce_get(firm_id, id) ⇒ Object
69
70
71
|
# File 'lib/enotas_nfe/endpoints.rb', line 69
def nfce_get(firm_id, id)
get("empresas/#{firm_id}/nfc-e/#{id}")
end
|
#nfe_create(firm_id, body) ⇒ Object
rotas para nota fiscal eletronica
48
49
50
|
# File 'lib/enotas_nfe/endpoints.rb', line 48
def nfe_create(firm_id, body)
post("empresas/#{firm_id}/nf-e", body)
end
|
#nfe_delete(firm_id, nfe_id) ⇒ Object
52
53
54
|
# File 'lib/enotas_nfe/endpoints.rb', line 52
def nfe_delete(firm_id, nfe_id)
delete("empresas/#{firm_id}/nf-e/#{nfe_id}")
end
|
#nfe_get(firm_id, id) ⇒ Object
56
57
58
|
# File 'lib/enotas_nfe/endpoints.rb', line 56
def nfe_get(firm_id, id)
get("empresas/#{firm_id}/nf-e/#{id}")
end
|
#nfse_create(firm_id, body) ⇒ Object
78
79
80
|
# File 'lib/enotas_nfe/endpoints.rb', line 78
def nfse_create(firm_id, body)
post("empresas/#{firm_id}/nfes", body)
end
|
#nfse_delete(firm_id, nfe_id) ⇒ Object
82
83
84
|
# File 'lib/enotas_nfe/endpoints.rb', line 82
def nfse_delete(firm_id, nfe_id)
delete("empresas/#{firm_id}/nfes/#{nfe_id}")
end
|
#nfse_delete_by_external_id(firm_id, external_id) ⇒ Object
94
95
96
|
# File 'lib/enotas_nfe/endpoints.rb', line 94
def nfse_delete_by_external_id(firm_id, external_id)
delete("empresas/#{firm_id}/nfes/porIdExterno/#{external_id}")
end
|
#nfse_get(firm_id, id) ⇒ Object
86
87
88
|
# File 'lib/enotas_nfe/endpoints.rb', line 86
def nfse_get(firm_id, id)
get("empresas/#{firm_id}/nfes/#{id}")
end
|
#nfse_get_by_external_id(firm_id, external_id) ⇒ Object
90
91
92
|
# File 'lib/enotas_nfe/endpoints.rb', line 90
def nfse_get_by_external_id(firm_id, external_id)
get("empresas/#{firm_id}/nfes/porIdExterno/#{external_id}")
end
|
#nfse_get_pdf(firm_id, id) ⇒ Object
98
99
100
|
# File 'lib/enotas_nfe/endpoints.rb', line 98
def nfse_get_pdf(firm_id, id)
get("empresas/#{firm_id}/nfes/#{id}")
end
|
#nfse_get_pdf_by_external_id(firm_id, external_id) ⇒ Object
102
103
104
|
# File 'lib/enotas_nfe/endpoints.rb', line 102
def nfse_get_pdf_by_external_id(firm_id, external_id)
get("empresas/#{firm_id}/nfes/porIdExterno/#{external_id}/pdf")
end
|
#nfse_get_xml(firm_id, id) ⇒ Object
106
107
108
|
# File 'lib/enotas_nfe/endpoints.rb', line 106
def nfse_get_xml(firm_id, id)
get("empresas/#{firm_id}/nfes/#{id}/xml")
end
|
#nfse_get_xml_by_external_id(firm_id, external_id) ⇒ Object
110
111
112
|
# File 'lib/enotas_nfe/endpoints.rb', line 110
def nfse_get_xml_by_external_id(firm_id, external_id)
get("empresas/#{firm_id}/nfes/porIdExterno/#{external_id}/xml")
end
|
#nfse_list(firm_id, body = {}) ⇒ Object
rotas para nota fiscal de serviço
74
75
76
|
# File 'lib/enotas_nfe/endpoints.rb', line 74
def nfse_list(firm_id, body = {})
get("empresas/#{firm_id}/nfes", body)
end
|
#set_certificado_digital(firm_id, body) ⇒ Object
26
27
28
|
# File 'lib/enotas_nfe/endpoints.rb', line 26
def set_certificado_digital(firm_id, body)
multipart_post("empresas/#{firm_id}/certificadoDigital", body)
end
|
#set_logo(firm_id, body) ⇒ Object
22
23
24
|
# File 'lib/enotas_nfe/endpoints.rb', line 22
def set_logo(firm_id, body)
multipart_post("empresas/#{firm_id}/logo", body)
end
|