apidae 0.9.19 → 0.9.20

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: 7b13060acb026b8cd289316b496426f7235fe3a2
4
- data.tar.gz: 755835bb7f99678d0f31d65e65f4384e2cf3de2f
3
+ metadata.gz: df0a5cb2f110a15a81b9ccf7fef90bc3866a03bf
4
+ data.tar.gz: c32086474b0bfaa2c7dc6ded495bf1638d1bf819
5
5
  SHA512:
6
- metadata.gz: 8590fd64ab7cf206bf63771af7c55445b8d1314e17e46d93944a40b0fbf1cee904b2368989daf278d2c178863a67b866bdf5f76acb3c2011b09c428894dc170f
7
- data.tar.gz: c259090ab67a2b8ea0377b8fc59a1828b20a4fd8de0fc2cb4c77a0182c84d6f5502a0a689a981c1601818e96ab2a2ea63982115c2a6e6a225085fa40a097a72f
6
+ metadata.gz: 8fe7d7f6112487e946af755512e46ba373f55c625268075e69339a726793843f496c67a8458130036f69b684a2eb675ea426489b062cd0f4ca6f362f73db8d59
7
+ data.tar.gz: 9df57f018b094c3369d1dda52bc2bee8070eda15a2fc4f9dc76e1d10c1cea6f4edd98adacc70bd34e4dd89e82dbd95eace8f19dc5f801f3dafea6d66166a32e4
@@ -14,7 +14,7 @@ module Apidae
14
14
  store_accessor :pictures_data, :pictures
15
15
  store_accessor :attachments_data, :attachments
16
16
  store_accessor :type_data, :categories, :themes, :capacity, :classification, :labels, :chains, :area, :track,
17
- :products, :audience, :animals, :extra, :duration, :certifications
17
+ :products, :audience, :animals, :extra, :duration, :certifications, :business
18
18
  store_accessor :entity_data, :entity_id, :entity_name, :service_provider_id
19
19
  store_accessor :contact, :telephone, :email, :website
20
20
  store_accessor :location_data, :address, :place, :latitude, :longitude, :access, :territories, :environments
@@ -150,7 +150,8 @@ module Apidae
150
150
  apidae_obj.openings_data = parse_openings(object_data[:ouverture], *locales)
151
151
  apidae_obj.rates_data = parse_rates(object_data[:descriptionTarif], *locales)
152
152
  apidae_obj.booking_data = parse_booking(object_data[:reservation], *locales)
153
- apidae_obj.type_data = parse_type_data(apidae_obj, object_data[type_fields[:node]], object_data[:prestations], *locales)
153
+ apidae_obj.type_data = parse_type_data(apidae_obj, object_data[type_fields[:node]], object_data[:prestations],
154
+ object_data[:tourismeAffaires], *locales)
154
155
  apidae_obj.pictures_data = parse_pictures_data(object_data[:illustrations], *locales)
155
156
  apidae_obj.attachments_data = parse_attachments_data(object_data[:multimedias], *locales)
156
157
  apidae_obj.entity_data = entity_fields(object_data[:informations], object_data[type_fields[:node]])
@@ -319,7 +320,7 @@ module Apidae
319
320
  end
320
321
  end
321
322
 
322
- def self.parse_type_data(apidae_obj, type_hash, presta_hash, *locales)
323
+ def self.parse_type_data(apidae_obj, type_hash, presta_hash, business_hash *locales)
323
324
  data_hash = type_hash || {}
324
325
  prestations_hash = presta_hash || {}
325
326
  apidae_obj.apidae_subtype = lists_ids(data_hash[:typesManifestation]).first if apidae_obj.apidae_type == FEM
@@ -343,7 +344,8 @@ module Apidae
343
344
  animals: prestations_hash[:animauxAcceptes] == 'ACCEPTES',
344
345
  extra: apidae_obj.apidae_type == SPA ? node_value(data_hash, :formuleHebergement, *locales) : node_value(prestations_hash, :complementAccueil, *locales),
345
346
  duration: apidae_obj.apidae_type == SPA ? {days: data_hash[:nombreJours], nights: data_hash[:nombreNuits]} : data_hash[:dureeSeance],
346
- certifications: data_hash[:agrements].blank? ? [] : data_hash[:agrements].map {|a| {id: a[:type][:id], identifier: a[:numero]}}
347
+ certifications: data_hash[:agrements].blank? ? [] : data_hash[:agrements].map {|a| {id: a[:type][:id], identifier: a[:numero]}},
348
+ business: business_hash
347
349
  }
348
350
  end
349
351
 
@@ -6,10 +6,11 @@ module Apidae
6
6
  LOCALE_NL = 'nl'
7
7
  LOCALE_RU = 'ru'
8
8
  LOCALE_ZH = 'zh'
9
+ LOCALE_ES = 'es'
9
10
  LOCALE_PT_BR = 'pt-BR'
10
11
 
11
12
  DEFAULT_LOCALE = LOCALE_FR
12
- ALL_LOCALES = [LOCALE_FR, LOCALE_EN, LOCALE_IT, LOCALE_DE, LOCALE_NL, LOCALE_RU, LOCALE_ZH, LOCALE_PT_BR]
13
+ ALL_LOCALES = [LOCALE_FR, LOCALE_EN, LOCALE_IT, LOCALE_DE, LOCALE_NL, LOCALE_RU, LOCALE_ZH, LOCALE_ES, LOCALE_PT_BR]
13
14
 
14
15
  STANDARD_VERSION = 'STANDARD'
15
16
  WINTER_VERSION = 'HIVER'
@@ -1,3 +1,3 @@
1
1
  module Apidae
2
- VERSION = "0.9.19"
2
+ VERSION = "0.9.20"
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: 0.9.19
4
+ version: 0.9.20
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-02-04 00:00:00.000000000 Z
11
+ date: 2020-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails