Module: EnotasNfe::Endpoints

Includes:
Request
Included in:
Client
Defined in:
lib/enotas_nfe/endpoints.rb

Instance Method Summary collapse

Methods included from Request

#delete, #get, #post

Instance Method Details

#create_update_empresa(body) ⇒ Object



14
15
16
# File 'lib/enotas_nfe/endpoints.rb', line 14

def create_update_empresa(body)
  post("empresas", body)
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_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=#{pageNumber}")
end

#nfe_create(firm_id, body) ⇒ Object

rotas para nota fiscal eletronica



24
25
26
# File 'lib/enotas_nfe/endpoints.rb', line 24

def nfe_create(firm_id, body)
  post("empresas/#{firm_id}/nf-e", body)
end

#nfe_delete(firm_id, nfe_id) ⇒ Object



28
29
30
# File 'lib/enotas_nfe/endpoints.rb', line 28

def nfe_delete(firm_id, nfe_id)
  delete("empresas/#{firm_id}/nf-e/#{nfe_id}")
end

#nfe_get(firm_id, id) ⇒ Object



32
33
34
# File 'lib/enotas_nfe/endpoints.rb', line 32

def nfe_get(firm_id, id)
  get("empresas/#{firm_id}/nf-e/#{id}")
end

#nfse_create(firm_id, body) ⇒ Object



41
42
43
# File 'lib/enotas_nfe/endpoints.rb', line 41

def nfse_create(firm_id, body)
  post("empresas/#{firm_id}/nfes", body)
end

#nfse_delete(firm_id, nfe_id) ⇒ Object



45
46
47
# File 'lib/enotas_nfe/endpoints.rb', line 45

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



57
58
59
# File 'lib/enotas_nfe/endpoints.rb', line 57

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



49
50
51
# File 'lib/enotas_nfe/endpoints.rb', line 49

def nfse_get(firm_id, id)
  get("empresas/#{firm_id}/nfes/#{id}")
end

#nfse_get_by_external_id(firm_id, external_id) ⇒ Object



53
54
55
# File 'lib/enotas_nfe/endpoints.rb', line 53

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



61
62
63
# File 'lib/enotas_nfe/endpoints.rb', line 61

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



65
66
67
# File 'lib/enotas_nfe/endpoints.rb', line 65

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



69
70
71
# File 'lib/enotas_nfe/endpoints.rb', line 69

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



73
74
75
# File 'lib/enotas_nfe/endpoints.rb', line 73

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



37
38
39
# File 'lib/enotas_nfe/endpoints.rb', line 37

def nfse_list(firm_id, body = {})
  get("empresas/#{firm_id}/nfes", body)
end

#set_logo(firm_id, body) ⇒ Object



18
19
20
# File 'lib/enotas_nfe/endpoints.rb', line 18

def (firm_id, body)
  post("empresas/#{firm_id}/logo", body)
end