apidae 1.2.7 → 1.2.8

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
  SHA1:
3
- metadata.gz: f7f870ce44d951a04a1b73afa9c3b16a5a8ebdb9
4
- data.tar.gz: e95f2475a72a05c59cbcab56863d77d316b4ffbc
3
+ metadata.gz: 60d30181c595dde4d2f63e3389cfab37de03ba14
4
+ data.tar.gz: c4f2dc5189846f3068537fa832735bdedee85cc1
5
5
  SHA512:
6
- metadata.gz: 9cf4871c99377ff9e1dbb875099a5b75279177fb1964a18f57363083c38af1f0b5bce1e8f880103486652b5bb417da7dbebf6b2d2602b537c2432d1bf801bc62
7
- data.tar.gz: 2896159f983e04f3710a82a465c75a5a2080336bfa6f4266c0ec10b6a7e46f6a2929a87ff410db44fb700ecfa8ccdfbd09e664e15ce8ae628c58b19c4cb43369
6
+ metadata.gz: 259771713e098dcfee2c5e20f1c42ec5209dc976a38177b43cb7580eb5a4bec5b6d6e3cdbc790a8ef1f1c37e4af2b55d3d1cc40401ad6da95f8cea60d9e05b20
7
+ data.tar.gz: 95a7109af9633d25cba07aaf58268905c51bcb9dc72387e0a13ab1b0a60868fa1e2cf32bfb1a1c38e00cf84b97a60ef8ad3582f4330c4aadce427cc877178a62
@@ -336,10 +336,15 @@ module Apidae
336
336
  end
337
337
  end
338
338
 
339
- def self.parse_entity_fields(information_hash, type_data_hash)
339
+ def self.parse_entity_fields(information_hash, type_data_hash, sp_hash)
340
+ entity_hash = {}
340
341
  if information_hash && information_hash[:structureGestion]
341
- {entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)}
342
+ entity_hash.merge!({entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)})
342
343
  end
344
+ if sp_hash && sp_hash[:prestataireActivites]
345
+ entity_hash[:is_service_provider] = true
346
+ end
347
+ entity_hash
343
348
  end
344
349
 
345
350
  def self.node_id(node, key)
@@ -16,7 +16,7 @@ module Apidae
16
16
  store_accessor :attachments_data, :attachments
17
17
  store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
18
18
  :products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
19
- store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id
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
22
  store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
@@ -190,7 +190,7 @@ module Apidae
190
190
  object_data[:tourismeAffaires], *locales)
191
191
  apidae_obj.pictures_data = ApidaeDataParser.parse_pictures_data(object_data[:illustrations], *locales)
192
192
  apidae_obj.attachments_data = ApidaeDataParser.parse_attachments_data(object_data[:multimedias], *locales)
193
- apidae_obj.entity_data = ApidaeDataParser.parse_entity_fields(object_data[:informations], object_data[type_fields[:node]])
193
+ apidae_obj.entity_data = ApidaeDataParser.parse_entity_fields(object_data[:informations], object_data[type_fields[:node]], object_data[:informationsPrestataireActivites])
194
194
  apidae_obj.service_data = ApidaeDataParser.parse_service_data(object_data[:prestations], object_data[type_fields[:node]])
195
195
  apidae_obj.tags_data = ApidaeDataParser.parse_tags_data(object_data[:presentation], object_data[:criteresInternes], object_data[:liens])
196
196
  apidae_obj.meta_data = object_data[:metadonnees]
@@ -8,9 +8,10 @@ module Apidae
8
8
  LOCALE_ZH = 'zh'
9
9
  LOCALE_ES = 'es'
10
10
  LOCALE_PT_BR = 'pt-BR'
11
+ LOCALE_JP = 'jp'
11
12
 
12
13
  DEFAULT_LOCALE = LOCALE_FR
13
- ALL_LOCALES = [LOCALE_FR, LOCALE_EN, LOCALE_IT, LOCALE_DE, LOCALE_NL, LOCALE_RU, LOCALE_ZH, LOCALE_ES, LOCALE_PT_BR]
14
+ ALL_LOCALES = [LOCALE_FR, LOCALE_EN, LOCALE_IT, LOCALE_DE, LOCALE_NL, LOCALE_RU, LOCALE_ZH, LOCALE_ES, LOCALE_PT_BR, LOCALE_JP]
14
15
 
15
16
  STANDARD_VERSION = 'STANDARD'
16
17
  WINTER_VERSION = 'HIVER'
@@ -41,6 +41,7 @@ fr:
41
41
  ru: Russe
42
42
  zh: Chinois
43
43
  'pt-BR': Brésilien
44
+ jp: Japonais
44
45
  versions:
45
46
  STANDARD: Standard
46
47
  HIVER: Hiver
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "1.2.7"
2
+ VERSION = "1.2.8"
3
3
  end
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.7
4
+ version: 1.2.8
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: 2020-11-06 00:00:00.000000000 Z
11
+ date: 2020-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails