apidae 1.3.1 → 1.3.2

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: ecf4dc2ccc60bf43998df20e62627e9f4ae8db4e
4
- data.tar.gz: 716a338e66bba90e698ff4352c1bb81d398937fc
3
+ metadata.gz: 3df5740373cfa229b7411e21a55eae04df831561
4
+ data.tar.gz: ec010b9d61a4cea4fa552180531f606498e04231
5
5
  SHA512:
6
- metadata.gz: 3f15e2f455ad96b75a6f9173b3626c5d5252eac4b57ef2df292b0a713d3a38d397d1091f7e3ab39f549bc73a8737158b1f77d0cb987148d255104ee87a77dc5d
7
- data.tar.gz: 0f72c91e82ad9dc80bd70202fc67e0818583a5567e2e10985ed6d89b1b2ccba74a0d0452103e23a4652dc65a0ba730139148d743dd04f8575f5f61cf5c2a4373
6
+ metadata.gz: 141dca6a42911917ad0722772df54b4f542364de8fe1502586e6710d9a37b0ade5cddd9abf5994b6768d8597b66fe3627f4fa3068d8d8da7506a4f899fa34737
7
+ data.tar.gz: 17f51ee8066cd53f353bf91f395191bb78255343f65f7978ff01e56c27b9205d91203687ad0c7b4b234cb05b88116decba24df1eba317b51d52992a9baa9495e
@@ -335,10 +335,15 @@ module Apidae
335
335
  end
336
336
  end
337
337
 
338
- def self.parse_entity_fields(information_hash, type_data_hash)
338
+ def self.parse_entity_fields(information_hash, type_data_hash, sp_hash)
339
+ entity_hash = {}
339
340
  if information_hash && information_hash[:structureGestion]
340
- {entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)}
341
+ entity_hash.merge!({entity_id: information_hash[:structureGestion][:id], service_provider_id: node_id(type_data_hash, :prestataireActivites)})
341
342
  end
343
+ if sp_hash && sp_hash[:prestataireActivites]
344
+ entity_hash[:is_service_provider] = true
345
+ end
346
+ entity_hash
342
347
  end
343
348
 
344
349
  def self.node_id(node, key)
@@ -15,7 +15,7 @@ module Apidae
15
15
  store_accessor :attachments_data, :attachments
16
16
  store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
17
17
  :products, :audience, :animals, :animals_desc, :extra, :duration, :certifications, :business
18
- store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id
18
+ store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id, :is_service_provider
19
19
  store_accessor :contact_data, :telephone, :email, :website, :google, :facebook, :twitter, :yelp, :trip_advisor, :fax,
20
20
  :mobile_website, :shorty_url, :contacts
21
21
  store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
@@ -183,7 +183,7 @@ module Apidae
183
183
  object_data[:tourismeAffaires], *locales)
184
184
  apidae_obj.pictures_data = ApidaeDataParser.parse_pictures_data(object_data[:illustrations], *locales)
185
185
  apidae_obj.attachments_data = ApidaeDataParser.parse_attachments_data(object_data[:multimedias], *locales)
186
- apidae_obj.entity_data = ApidaeDataParser.parse_entity_fields(object_data[:informations], object_data[type_fields[:node]])
186
+ apidae_obj.entity_data = ApidaeDataParser.parse_entity_fields(object_data[:informations], object_data[type_fields[:node]], object_data[:informationsPrestataireActivites])
187
187
  apidae_obj.service_data = ApidaeDataParser.parse_service_data(object_data[:prestations], object_data[type_fields[:node]])
188
188
  apidae_obj.tags_data = ApidaeDataParser.parse_tags_data(object_data[:presentation], object_data[:criteresInternes], object_data[:liens])
189
189
  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.3.1"
2
+ VERSION = "1.3.2"
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.3.1
4
+ version: 1.3.2
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-12 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