bumeran 0.2.0 → 0.2.1
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/Gemfile.lock +1 -1
- data/lib/bumeran.rb +5 -3
- data/lib/bumeran/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73277068e5bfa42dedd97c11a5455ba7ba3fd23a
|
4
|
+
data.tar.gz: a87984ee76063a202eab429d6e1f695fea843b18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 242a2fe2222264b9b0cb44a876ea660d8c28edbb44f83176ace9ffb1b22f92c553957805225a384f1024fbcad952992a425562138f2a46dab6d20d1e3dc50c7b
|
7
|
+
data.tar.gz: 540a3898d82baf3bd8b340cfe7e6d130124af397ed8fd2b1e431d5a8a3aa2af6d4342c2495a2af73126ac9e42a337924c973161d628e64f3554eca35273cf103
|
data/Gemfile.lock
CHANGED
data/lib/bumeran.rb
CHANGED
@@ -174,7 +174,7 @@ module Bumeran
|
|
174
174
|
# Generation of service helpers
|
175
175
|
SERVICES = {
|
176
176
|
areas: {object: :area},
|
177
|
-
subareas: {object: :subarea, parent: :area},
|
177
|
+
subareas: {object: :subarea, parent: :area, parent_service: :areas},
|
178
178
|
paises: {object: :pais},
|
179
179
|
zonas: {object: :zona, parent: :pais, parent_service: :paises},
|
180
180
|
localidades: {object: :localidad, parent: :zona, parent_service: :zonas},
|
@@ -220,7 +220,7 @@ module Bumeran
|
|
220
220
|
end
|
221
221
|
|
222
222
|
# def self.zonas_in(pais_id)
|
223
|
-
if service[:parent]
|
223
|
+
if service[:parent] && service[:parent_service]
|
224
224
|
define_singleton_method("#{service_name}_in") do |parent_object_id|
|
225
225
|
generic_find_all_in(service_name, service[:parent], service[:parent_service], parent_object_id)
|
226
226
|
end
|
@@ -363,7 +363,9 @@ module Bumeran
|
|
363
363
|
localidades_path = "/v0/empresas/locacion/zonas/#{zona_id}/localidades"
|
364
364
|
response = self.get(localidades_path, @@options)
|
365
365
|
|
366
|
-
Parser.parse_response_to_json(response)
|
366
|
+
json = Parser.parse_response_to_json(response)
|
367
|
+
Parser.parse_json_to_hash(json, @@localidades) # to save the localidades
|
368
|
+
Parser.parse_json_to_hash(json, {}) # to return only the localidades from the zone
|
367
369
|
end
|
368
370
|
|
369
371
|
def self.get_plan_publicaciones_in(pais_id)
|
data/lib/bumeran/version.rb
CHANGED