apidae 1.4.9 → 1.4.11

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
  SHA256:
3
- metadata.gz: 2bbdf35cd06b96fee3b3e64970262c2f424d204c6471fb3bd26e16704d9a033c
4
- data.tar.gz: caa1504d94682ee3ed80777d24955084fec7a045e41870e2759c9dfbcaa511a6
3
+ metadata.gz: e76872d44f9682c8a7833f8d51a1418e1869c5c740e8c6786df34c5456b4ee1b
4
+ data.tar.gz: d51068a42890021698dd500384c070e5e590f64717d79707f886c510bc8a379f
5
5
  SHA512:
6
- metadata.gz: '08456092efcc2417bef00d40d0e5898cf088617f4dc04500180a713d71ec4b052f0b0292adb3407e63c94ed5e5647ce141380389760bf544ed8e63b4475b1bc3'
7
- data.tar.gz: a42b55b7a83b89c6859d436f7b45d5b4098ad5234fc559969e1a967aec94145e6de3ecd551a88da0aefed999843a1a58ee4c2c0fecf334b25bbc540975d6d090
6
+ metadata.gz: e92ebf91f66cb3cacb21d1d46268c59d9b5306517a51c6f65d919bb25898eb6f899a597b7efaef4ab7f2067c57b6c6f103934dd6b4a07019c46916f6c602a7bc
7
+ data.tar.gz: cb1ab3ff93737cc7a1b6763940cef06747a10ff28fa0f10e5d65f3c4dfa06db9c5a2997146dd2227b2f4831322513e51e4d597aa35897dac112aac28942268c3
@@ -358,6 +358,7 @@ module Apidae
358
358
  end
359
359
  if sp_hash && sp_hash[:prestataireActivites]
360
360
  entity_hash[:is_service_provider] = true
361
+ entity_hash[:service_provider_certifications] = lists_ids(entity_hash[:habilitationsPrestataires])
361
362
  end
362
363
  entity_hash
363
364
  end
@@ -18,7 +18,8 @@ module Apidae
18
18
  store_accessor :type_data, :categories, :themes, :capacity, :classification, :classification_date,
19
19
  :classification_ref, :labels, :chains, :area, :track, :tricky_sections, :products, :audience, :animals,
20
20
  :animals_desc, :extra, :duration, :certifications, :business, :business_equipments, :business_rooms
21
- store_accessor :entity_data, :entity_id, :entity_name, :info_entity_id, :info_entity_name, :service_provider_id, :is_service_provider, :legal
21
+ store_accessor :entity_data, :entity_id, :entity_name, :info_entity_id, :info_entity_name, :service_provider_id,
22
+ :is_service_provider, :service_provider_certifications, :legal
22
23
  store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
23
24
  :mobile_website, :shorty_url, :instagram, :contacts
24
25
  store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments, :altitude, :map_reference
@@ -12,9 +12,9 @@ module Apidae
12
12
  def self.import(refs_json)
13
13
  locales = Rails.application.config.respond_to?(:apidae_locales) ? Rails.application.config.apidae_locales : [DEFAULT_LOCALE]
14
14
  locales_map = Hash[locales.map {|loc| ["libelle#{loc.camelize.gsub('-', '')}".to_sym, loc]}]
15
- if count == 0 || Time.current > (maximum(:updated_at) + 1.day)
15
+ if count == 0 || Time.current > (unscoped.maximum(:updated_at) + 1.day)
16
16
  refs_hashes = JSON.parse(refs_json, symbolize_names: true)
17
- if refs_hashes.length != where("apidae_type != ?", INTERNAL).count
17
+ if refs_hashes.length != unscoped.where("apidae_type != ?", INTERNAL).count
18
18
  refs_hashes.each do |ref_data|
19
19
  ref = Reference.unscoped.find_or_initialize_by(apidae_id: ref_data[:id], apidae_type: ref_data[:elementReferenceType])
20
20
  ref.label_data = ref_data.slice(*locales_map.keys).transform_keys {|k| locales_map[k]}
@@ -32,5 +32,5 @@ module Apidae
32
32
  :google, :facebook, :twitter, :yelp, :trip_advisor, :fax, :mobile_website, :shorty_url, :instagram,
33
33
  :openings, :openings_extra, :rates, :services, :payment_methods, :categories, :themes,
34
34
  :labels, :chains, :classification, :challenged, :environments, :languages, :products,
35
- :animals, :equipments, :comfort, :activities, :promo, :internal, :linked]
35
+ :animals, :equipments, :comfort, :activities, :promo, :internal, :linked, :service_provider_certifications]
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.4.9"
2
+ VERSION = "1.4.11"
3
3
  end