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 +4 -4
- data/README.md +35 -8
- data/lib/cumulus/patient.rb +1 -0
- data/lib/cumulus/pmx.rb +9 -4
- data/lib/cumulus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9442c48e0458e67412ed42a51ece52e13a3c38e
|
4
|
+
data.tar.gz: 5a7cedb4a757fc6d54a37e9924d9cb2636dd11d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
68
|
+
Fetch Pemex companies
|
69
69
|
|
70
70
|
```ruby
|
71
|
-
pmx.
|
71
|
+
pmx.fetch_companies
|
72
72
|
```
|
73
73
|
|
74
|
-
|
74
|
+
Fetch Pemex employees
|
75
75
|
|
76
76
|
```ruby
|
77
|
-
pmx.
|
78
|
-
'
|
77
|
+
pmx.fetch_employees({
|
78
|
+
'numeroEmpresa' => '123',
|
79
|
+
'numeroEmpleado' => '123'
|
80
|
+
})
|
79
81
|
```
|
80
82
|
|
81
|
-
|
83
|
+
Fetch Pemex entitled
|
82
84
|
|
83
85
|
```ruby
|
84
|
-
pmx.
|
85
|
-
'
|
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
|
data/lib/cumulus/patient.rb
CHANGED
data/lib/cumulus/pmx.rb
CHANGED
@@ -4,23 +4,28 @@ module Cumulus
|
|
4
4
|
@client = client
|
5
5
|
end
|
6
6
|
|
7
|
-
def
|
7
|
+
def fetch_companies
|
8
8
|
client.request(:get, '/pemex/empresas')
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def fetch_employees(params)
|
12
12
|
client.request(:post, '/pemex/empleados', params)
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def fetch_entitled(params)
|
16
16
|
client.request(:post, '/pemex/derecho_habiente', params)
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
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
|
data/lib/cumulus/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|