cumulus_ruby 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4434b0828e8cf265468e60a22cd0dbce6d2ad033
4
- data.tar.gz: 3afcc995fc6c466b23c27fdc172b765e78ba4e96
3
+ metadata.gz: d9442c48e0458e67412ed42a51ece52e13a3c38e
4
+ data.tar.gz: 5a7cedb4a757fc6d54a37e9924d9cb2636dd11d1
5
5
  SHA512:
6
- metadata.gz: d5f3c1dfc06bb6ad5f264552f27ac5b790008e64e512e0fdedcf8833fe251ea9707d66aa5d6472e410da54fb56cf3674c58910c8639441187214c9f2b8f17b15
7
- data.tar.gz: 5e766f265cd91deaf7d34406e0c1d99771c003d948fb35bdb6b9e1fab319dddacb7b22d29e3aaa342ae9f6d2ed2d63de6fac1d11782994a32252e4551e1d4366
6
+ metadata.gz: bd07332f42f3518e3ce0188ec8534b494e0d6b0576668805adf43ee95e360dedc56f09a39b223e2008be559e61d0f4fb2baf67072841585ab0afbc53e67fa010
7
+ data.tar.gz: 01f0ca06e81ac20619778ab1e19001c2048ac1c068c1b3faf777b134313894433403479e36838a69a6f4d76e8e94e78c926cef3cf2b1c09ceb88823b1ad1e30f
data/README.md CHANGED
@@ -65,24 +65,51 @@ patient.search(other_patient.curp, { query: 'foo' })
65
65
  pmx = Cumulus::Pmx.new(client)
66
66
  ```
67
67
 
68
- Look for companies
68
+ Fetch Pemex companies
69
69
 
70
70
  ```ruby
71
- pmx.companies
71
+ pmx.fetch_companies
72
72
  ```
73
73
 
74
- Look for entitlement
74
+ Fetch Pemex employees
75
75
 
76
76
  ```ruby
77
- pmx.entitled({ 'numeroEmpresa' => '123',
78
- 'numeroEmpleado' => '123', 'codigoDerechoHabiente' => '0' })
77
+ pmx.fetch_employees({
78
+ 'numeroEmpresa' => '123',
79
+ 'numeroEmpleado' => '123'
80
+ })
79
81
  ```
80
82
 
81
- Look for employee
83
+ Fetch Pemex entitled
82
84
 
83
85
  ```ruby
84
- pmx.employee({ 'numeroEmpresa' => '123',
85
- 'numeroEmpleado' => '123' })
86
+ pmx.fetch_entitled({
87
+ 'numeroEmpresa' => '123',
88
+ 'numeroEmpleado' => '123',
89
+ 'codigoDerechoHabiente' => '0'
90
+ })
91
+ ```
92
+
93
+ Fetch patient by Pemex
94
+
95
+ ```ruby
96
+ pmx.fetch_patient({
97
+ 'numeroEmpresa' => '123',
98
+ 'numeroEmpleado' => '123',
99
+ 'codigoDerechoHabiente' => '0'
100
+ })
101
+ ```
102
+
103
+ Link patient to Pemex
104
+
105
+ ```ruby
106
+ pmx.link_patient('AMED123123', {
107
+ 'numeroEmpresa' => '123',
108
+ 'numeroEmpleado' => '124',
109
+ 'codigoDerechoHabiente' => '0',
110
+ 'localidad' => 'Localidad 01',
111
+ 'derechoHabiente' => false
112
+ })
86
113
  ```
87
114
 
88
115
  ## License
@@ -44,6 +44,7 @@ module Cumulus
44
44
  end
45
45
 
46
46
  private
47
+
47
48
  def client
48
49
  @client
49
50
  end
data/lib/cumulus/pmx.rb CHANGED
@@ -4,23 +4,28 @@ module Cumulus
4
4
  @client = client
5
5
  end
6
6
 
7
- def companies
7
+ def fetch_companies
8
8
  client.request(:get, '/pemex/empresas')
9
9
  end
10
10
 
11
- def employees(params)
11
+ def fetch_employees(params)
12
12
  client.request(:post, '/pemex/empleados', params)
13
13
  end
14
14
 
15
- def entitled(params)
15
+ def fetch_entitled(params)
16
16
  client.request(:post, '/pemex/derecho_habiente', params)
17
17
  end
18
18
 
19
- def patient(params)
19
+ def fetch_patient(params)
20
20
  client.request(:post, '/pemex/paciente', params)
21
21
  end
22
22
 
23
+ def link_patient(curp, params)
24
+ client.request(:post, "/pacientes/#{curp}/pemex", params)
25
+ end
26
+
23
27
  private
28
+
24
29
  def client
25
30
  @client
26
31
  end
@@ -1,3 +1,3 @@
1
1
  module Cumulus
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cumulus_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amed Rodriguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler