Class: EnotasNfe::Client
- Inherits:
-
Object
- Object
- EnotasNfe::Client
- Includes:
- Connection, Endpoints, Facades, Request
- Defined in:
- lib/enotas_nfe/client.rb
Constant Summary collapse
- NFSE_ENDPOINT =
"https://api.enotasgw.com.br/v1"
- NFE_ENDPOINT =
"https://api.enotasgw.com.br/v2"
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
Instance Method Summary collapse
-
#initialize(auth_token, endpoint) ⇒ Client
constructor
A new instance of Client.
Methods included from Endpoints
#cc_create, #create_update_empresa, #desabilitar_empresa, #get_caracteristicas_prefeitura, #get_empresa, #get_empresa_by_cnpj, #get_empresas, #habilitar_empresa, #nfce_create, #nfce_delete, #nfce_get, #nfe_create, #nfe_delete, #nfe_get, #nfse_create, #nfse_delete, #nfse_delete_by_external_id, #nfse_get, #nfse_get_by_external_id, #nfse_get_pdf, #nfse_get_pdf_by_external_id, #nfse_get_xml, #nfse_get_xml_by_external_id, #nfse_list, #set_certificado_digital, #set_logo
Methods included from Request
#delete, #get, #multipart_post, #post
Methods included from Facades
Constructor Details
#initialize(auth_token, endpoint) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 19 20 |
# File 'lib/enotas_nfe/client.rb', line 13 def initialize(auth_token, endpoint) @auth_token = auth_token if endpoint == 'nfe' @endpoint = NFE_ENDPOINT else @endpoint = NFSE_ENDPOINT end end |
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
11 12 13 |
# File 'lib/enotas_nfe/client.rb', line 11 def auth_token @auth_token end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
11 12 13 |
# File 'lib/enotas_nfe/client.rb', line 11 def endpoint @endpoint end |