Class: Cumulus::Pmx
- Inherits:
-
Object
- Object
- Cumulus::Pmx
- Defined in:
- lib/cumulus/pmx.rb
Instance Method Summary collapse
- #fetch_companies ⇒ Object
- #fetch_employees(params) ⇒ Object
- #fetch_entitled(params) ⇒ Object
- #fetch_patient(params) ⇒ Object
- #fetch_patient_by_curp(curp) ⇒ Object
-
#initialize(client) ⇒ Pmx
constructor
A new instance of Pmx.
- #link_patient(curp, params) ⇒ Object
Constructor Details
#initialize(client) ⇒ Pmx
Returns a new instance of Pmx.
3 4 5 |
# File 'lib/cumulus/pmx.rb', line 3 def initialize(client) @client = client end |
Instance Method Details
#fetch_companies ⇒ Object
7 8 9 |
# File 'lib/cumulus/pmx.rb', line 7 def fetch_companies client.request(:get, '/pemex/empresas') end |
#fetch_employees(params) ⇒ Object
11 12 13 |
# File 'lib/cumulus/pmx.rb', line 11 def fetch_employees(params) client.request(:post, '/pemex/empleados', params) end |
#fetch_entitled(params) ⇒ Object
15 16 17 |
# File 'lib/cumulus/pmx.rb', line 15 def fetch_entitled(params) client.request(:post, '/pemex/derecho_habiente', params) end |
#fetch_patient(params) ⇒ Object
19 20 21 |
# File 'lib/cumulus/pmx.rb', line 19 def fetch_patient(params) client.request(:post, '/pemex/paciente', params) end |
#fetch_patient_by_curp(curp) ⇒ Object
23 24 25 |
# File 'lib/cumulus/pmx.rb', line 23 def fetch_patient_by_curp(curp) client.request(:get, "/pacientes/#{curp}/pemex") end |
#link_patient(curp, params) ⇒ Object
27 28 29 |
# File 'lib/cumulus/pmx.rb', line 27 def link_patient(curp, params) client.request(:post, "/pacientes/#{curp}/pemex", params) end |