Class: ApiBrasil::Services::Data::CorreiosService
- Inherits:
-
ApiBrasil::Services::DeviceProxyService
- Object
- BaseService
- ApiBrasil::Services::DeviceProxyService
- ApiBrasil::Services::Data::CorreiosService
- Defined in:
- lib/api_brasil/services/data/correios_service.rb
Overview
Correios (device-based): /correios/{action}.
Instance Attribute Summary
Attributes inherited from ApiBrasil::Services::DeviceProxyService
Attributes inherited from BaseService
Instance Method Summary collapse
-
#initialize(http) ⇒ CorreiosService
constructor
A new instance of CorreiosService.
-
#rastreio(body, options = {}) ⇒ Object
Rastreio de encomendas:
POST /correios/rastreiobody{"code" => ...}.
Methods inherited from ApiBrasil::Services::DeviceProxyService
Methods inherited from BaseService
#delete, #download, #get, #patch, #post, #put
Constructor Details
#initialize(http) ⇒ CorreiosService
Returns a new instance of CorreiosService.
10 11 12 |
# File 'lib/api_brasil/services/data/correios_service.rb', line 10 def initialize(http) super(http, "correios") end |
Instance Method Details
#rastreio(body, options = {}) ⇒ Object
Rastreio de encomendas: POST /correios/rastreio body {"code" => ...}.
17 18 19 |
# File 'lib/api_brasil/services/data/correios_service.rb', line 17 def rastreio(body, = {}) request("rastreio", body, ) end |