apidae 1.2.11 → 1.2.12
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/app/models/apidae/apidae_data_parser.rb +10 -5
- data/app/models/apidae/obj.rb +3 -3
- data/lib/apidae/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: 14c1e6c1ecb7759e122f8b6598d38df5a3c6c65e
|
4
|
+
data.tar.gz: b053447b481455f07d200ea6c3c2ddaa306ce451
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75533fc47e84a10f7fe1409103bb4aa027a7f807581565f690fb575c45beb9f05a21e3741702ec47dd85a77ca9534b82a8087af911e0f32df81e1142881e7a36
|
7
|
+
data.tar.gz: 4ce2cc2ebd34a81f1029d258a36fe522a9900f33adfcd029cfb01c29a22034ff3b0edb84a8d40cd3542ec0df95ce33741047e07607edacaffd82426084bc0c69
|
@@ -220,6 +220,7 @@ module Apidae
|
|
220
220
|
loc_data.merge!({place: type_data_hash[:nomLieu]}) if type_data_hash
|
221
221
|
geoloc_details = location_hash[:geolocalisation]
|
222
222
|
if geoloc_details && geoloc_details[:valide] && geoloc_details[:geoJson]
|
223
|
+
loc_data[:altitude] = geoloc_details[:altitude]
|
223
224
|
loc_data[:latitude] = geoloc_details[:geoJson][:coordinates][1]
|
224
225
|
loc_data[:longitude] = geoloc_details[:geoJson][:coordinates][0]
|
225
226
|
end
|
@@ -319,13 +320,17 @@ module Apidae
|
|
319
320
|
tags
|
320
321
|
end
|
321
322
|
|
322
|
-
def self.parse_booking(reservation_hash, *locales)
|
323
|
+
def self.parse_booking(reservation_hash, visits_hash, *locales)
|
324
|
+
booking_hash = {}
|
323
325
|
if reservation_hash
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
326
|
+
booking_hash[:booking_desc] = node_value(reservation_hash, :complement, *locales),
|
327
|
+
booking_hash[:booking_entities] = reservation_hash[:organismes]
|
328
|
+
end
|
329
|
+
if visits_hash
|
330
|
+
booking_hash[:visits_allowed] = visits_hash[:visitable] == true
|
331
|
+
booking_hash[:visits_desc] = node_value(visits_hash, :complementVisite, *locales)
|
328
332
|
end
|
333
|
+
booking_hash
|
329
334
|
end
|
330
335
|
|
331
336
|
def self.parse_town(location_hash)
|
data/app/models/apidae/obj.rb
CHANGED
@@ -19,11 +19,11 @@ module Apidae
|
|
19
19
|
store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id, :is_service_provider
|
20
20
|
store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
|
21
21
|
:mobile_website, :shorty_url, :contacts
|
22
|
-
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
|
22
|
+
store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude
|
23
23
|
store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra
|
24
24
|
store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes, :rates_extra
|
25
25
|
store_accessor :service_data, :services, :equipments, :comfort, :activities, :challenged, :languages
|
26
|
-
store_accessor :booking_data, :booking_desc, :booking_entities
|
26
|
+
store_accessor :booking_data, :booking_desc, :booking_entities, :visits_allowed, :visits_desc
|
27
27
|
store_accessor :tags_data, :promo, :internal, :linked
|
28
28
|
store_accessor :version_data, :versioned_fields
|
29
29
|
|
@@ -185,7 +185,7 @@ module Apidae
|
|
185
185
|
apidae_obj.town = ApidaeDataParser.parse_town(object_data[:localisation])
|
186
186
|
apidae_obj.openings_data = ApidaeDataParser.parse_openings(object_data[:ouverture], *locales)
|
187
187
|
apidae_obj.rates_data = ApidaeDataParser.parse_rates(object_data[:descriptionTarif], *locales)
|
188
|
-
apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], *locales)
|
188
|
+
apidae_obj.booking_data = ApidaeDataParser.parse_booking(object_data[:reservation], object_data[:visites], *locales)
|
189
189
|
apidae_obj.type_data = ApidaeDataParser.parse_type_data(apidae_obj, object_data[type_fields[:node]], object_data[:prestations],
|
190
190
|
object_data[:tourismeAffaires], *locales)
|
191
191
|
apidae_obj.pictures_data = ApidaeDataParser.parse_pictures_data(object_data[:illustrations], *locales)
|
data/lib/apidae/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apidae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Vilain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|