apidae 1.2.25 → 1.2.28

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55a677481b1efaae797cfb4a8eee0934ba53f43f22798cbffcf75a6ffb1be7d4
4
- data.tar.gz: cfac72c0ac44ddbd30e6f2a0579da62dc31fb96c0e901389de0fda9c0ef6d371
3
+ metadata.gz: 02b8f4d3c4d713d8fc47e92c07456104e1b05d769ebdb01bc59671e942720828
4
+ data.tar.gz: dd7d5a3f0bd190e7b4c0b03b75e113a11550f4d6c903772f9de6a60ce62da775
5
5
  SHA512:
6
- metadata.gz: 2926c3b6b1010966dbe2bfd8822cc6eba1d712881d611139f0686c2fbcf326b8093f7136acf72e5507027696aa6b6eea36c3a52d4782a9967a58c042becd270c
7
- data.tar.gz: 772265b17f2cdeecee25670aa7faaa94f9c97b0b4b6c2e36d657326e84d071e23e02e7667541d69b8f93ffc67574c36739de97cd1a0c252648165c32f3550903
6
+ metadata.gz: 0ae60a8ea8f42931b011efd426d2603185650787c8a827eb2ecc0f1122e734ab04d00c25a0708126698a125ba0f8f0b41e1469665a57858be18b1a30751b45cc
7
+ data.tar.gz: f680e4fae89857c3039d1974b16f403dd8a60599ba86bd462c170446852df14f65005e623158dd0c89a9852317475d4abee51ce31ad649e65819ac36f8509fd3
@@ -251,8 +251,10 @@ module Apidae
251
251
  desc = rates_hash[:gratuit] ? {DEFAULT_LOCALE => 'gratuit'} : node_value(rates_hash, :tarifsEnClair, *locales)
252
252
  values = rates_hash[:periodes].blank? ? [] : rates_hash[:periodes].map {|p| build_rate(p, *locales)}
253
253
  methods = rates_hash[:modesPaiement].blank? ? [] : rates_hash[:modesPaiement].map {|p| p[:id]}
254
+
254
255
  {
255
256
  rates_desc: desc, rates: values, payment_methods: methods,
257
+ tax_included: rates_hash[:taxeDeSejourIncluse].blank? ? nil : (rates_hash[:taxeDeSejourIncluse] == 'OUI'),
256
258
  rates_desc_mode: rates_hash[:tarifsEnClairGenerationMode] == 'AUTOMATIQUE' ? MODE_AUTO : MODE_MANUAL,
257
259
  includes: node_value(rates_hash, :leTarifComprend, *locales),
258
260
  excludes: node_value(rates_hash, :leTarifNeComprendPas, *locales),
@@ -275,6 +277,8 @@ module Apidae
275
277
  age_min: presta_hash[:ageMin], age_max: presta_hash[:ageMax]} : {}),
276
278
  classification: nodes_ids(data_hash[:classement], data_hash[:classementPrefectoral], data_hash[:classification]) +
277
279
  lists_ids(data_hash[:classementsGuides]) + lists_ids(data_hash[:classements]),
280
+ classification_date: data_hash[:dateClassement],
281
+ classification_ref: data_hash[:numeroClassement],
278
282
  labels: lists_ids(data_hash[:labels], data_hash[:labelsChartesQualite], prestations_hash[:labelsTourismeHandicap]) +
279
283
  (node_id(data_hash, :typeLabel) ? [node_id(data_hash, :typeLabel)] : []),
280
284
  chains: lists_ids(data_hash[:chaines]) + nodes_ids(data_hash[:chaineEtLabel]),
@@ -288,7 +292,10 @@ module Apidae
288
292
  extra: apidae_obj.apidae_type == Obj::SPA ? node_value(data_hash, :formuleHebergement, *locales) : node_value(prestations_hash, :complementAccueil, *locales),
289
293
  duration: apidae_obj.apidae_type == Obj::SPA ? {days: data_hash[:nombreJours], nights: data_hash[:nombreNuits]} : data_hash[:dureeSeance],
290
294
  certifications: data_hash[:agrements].blank? ? [] : data_hash[:agrements].map {|a| {id: a[:type][:id], identifier: a[:numero]}},
291
- business: business_hash
295
+ business: (business_hash || {}).except(:sallesEquipeesPour, :sallesEquipement, :sallesRestauration, :sallesReunion, :sallesHebergement),
296
+ business_equipments: lists_ids((business_hash || {})[:sallesEquipeesPour], (business_hash || {})[:sallesEquipement],
297
+ (business_hash || {})[:sallesRestauration], (business_hash || {})[:sallesHebergement]),
298
+ business_rooms: (business_hash || {})[:sallesReunion]
292
299
  }
293
300
  end
294
301
 
@@ -325,13 +332,14 @@ module Apidae
325
332
  def self.parse_booking(reservation_hash, visits_hash, *locales)
326
333
  booking_hash = {}
327
334
  if reservation_hash
328
- booking_hash[:booking_desc] = node_value(reservation_hash, :complement, *locales),
335
+ booking_hash[:booking_desc] = node_value(reservation_hash, :complement, *locales)
329
336
  booking_hash[:booking_entities] = reservation_hash[:organismes]
330
337
  end
331
338
  if visits_hash
332
339
  booking_hash[:visits_allowed] = visits_hash[:visitable] == true
333
340
  booking_hash[:visits_desc] = node_value(visits_hash, :complementVisite, *locales)
334
341
  booking_hash[:visits_duration] = visits_hash[:dureeMoyenneVisiteIndividuelle]
342
+ booking_hash[:visits_services] = lists_ids(visits_hash[:prestationsVisitesGroupees]) + lists_ids(visits_hash[:prestationsVisitesIndividuelles])
335
343
  end
336
344
  booking_hash
337
345
  end
@@ -14,16 +14,17 @@ module Apidae
14
14
  store_accessor :description_data, :short_desc, :long_desc, :theme_desc, :private_desc
15
15
  store_accessor :pictures_data, :pictures
16
16
  store_accessor :attachments_data, :attachments
17
- store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
18
- :tricky_sections, :products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
17
+ store_accessor :type_data, :categories, :themes, :capacity, :classification, :classification_date,
18
+ :classification_ref, :labels, :chains, :area, :track, :tricky_sections, :products, :audience, :animals,
19
+ :animals_desc, :extra, :duration, :certifications, :business, :business_equipments, :business_rooms
19
20
  store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id, :is_service_provider, :legal
20
21
  store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
21
22
  :mobile_website, :shorty_url, :contacts
22
23
  store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude, :map_reference
23
24
  store_accessor :openings_data, :openings_desc, :openings_desc_mode, :openings, :time_periods, :openings_extra
24
- store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes, :rates_extra
25
+ store_accessor :rates_data, :rates_desc, :rates_desc_mode, :rates, :payment_methods, :includes, :excludes, :rates_extra, :tax_included
25
26
  store_accessor :service_data, :services, :equipments, :comfort, :activities, :challenged, :languages
26
- store_accessor :booking_data, :booking_desc, :booking_entities, :visits_allowed, :visits_desc, :visits_duration
27
+ store_accessor :booking_data, :booking_desc, :booking_entities, :visits_allowed, :visits_desc, :visits_duration, :visits_services
27
28
  store_accessor :tags_data, :promo, :internal, :linked
28
29
  store_accessor :version_data, :versioned_fields
29
30
 
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.2.25"
2
+ VERSION = "1.2.28"
3
3
  end
@@ -22,3 +22,51 @@ For historical reasons, it may run twice, so it has to be idempotent.
22
22
  Check the "Autoloading and Reloading Constants" guide to learn more about how
23
23
  Rails autoloads and reloads.
24
24
  (called from <top (required)> at /Users/jbvilain/workspace/apidae-engine-rails/test/dummy/config/environment.rb:5)
25
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
26
+
27
+ Being able to do this is deprecated. Autoloading during initialization is going
28
+ to be an error condition in future versions of Rails.
29
+
30
+ Reloading does not reboot the application, and therefore code executed during
31
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
32
+ the expected changes won't be reflected in that stale Module object.
33
+
34
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
35
+
36
+ In order to autoload safely at boot time, please wrap your code in a reloader
37
+ callback this way:
38
+
39
+ Rails.application.reloader.to_prepare do
40
+ # Autoload classes and modules needed at boot time here.
41
+ end
42
+
43
+ That block runs when the application boots, and every time there is a reload.
44
+ For historical reasons, it may run twice, so it has to be idempotent.
45
+
46
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
47
+ Rails autoloads and reloads.
48
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)
49
+ DEPRECATION WARNING: Initialization autoloaded the constants Apidae::ApidaeHelper, Apidae::ApplicationHelper, Apidae::ApiHelper, Apidae::DashboardHelper, Apidae::ExtendableHelper, Apidae::ImportHelper, Apidae::ObjectsHelper, Apidae::ReferencesHelper, Apidae::SelectionsHelper, and Apidae::ApplicationController.
50
+
51
+ Being able to do this is deprecated. Autoloading during initialization is going
52
+ to be an error condition in future versions of Rails.
53
+
54
+ Reloading does not reboot the application, and therefore code executed during
55
+ initialization does not run again. So, if you reload Apidae::ApidaeHelper, for example,
56
+ the expected changes won't be reflected in that stale Module object.
57
+
58
+ `config.autoloader` is set to `classic`. These autoloaded constants would have been unloaded if `config.autoloader` had been set to `:zeitwerk`.
59
+
60
+ In order to autoload safely at boot time, please wrap your code in a reloader
61
+ callback this way:
62
+
63
+ Rails.application.reloader.to_prepare do
64
+ # Autoload classes and modules needed at boot time here.
65
+ end
66
+
67
+ That block runs when the application boots, and every time there is a reload.
68
+ For historical reasons, it may run twice, so it has to be idempotent.
69
+
70
+ Check the "Autoloading and Reloading Constants" guide to learn more about how
71
+ Rails autoloads and reloads.
72
+ (called from <top (required)> at /Users/jbvilain/workspace/code/apidae-engine-rails/test/dummy/config/environment.rb:5)