booker_ruby 3.3.12 → 3.3.13

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: 42ae305776aa66af588956675870c4ff366633bfc1ecd86fe89fc6f11022c4ff
4
- data.tar.gz: a3e3ee7f7d976bc9ddaddf1523e4f728cd3454a762eab886df1de12ce3e0c0ec
3
+ metadata.gz: 62d919536842789f8e67155a96ce898160f0a064750ac308b9bc41170a5605a0
4
+ data.tar.gz: 6d118cf4aeddbbb7f1d6fb55bfe57c3568194bb7d67643e30abb05cb9c06d380
5
5
  SHA512:
6
- metadata.gz: f69ac754ed864e78110a4ad10c4dbcc1d1f5adbe50f2e382f9f0d61f47967fbbb85e0caf71263a3a8ed148582d39b2b58faedc07ef788c689e8c96348e7b62ec
7
- data.tar.gz: 80db458499485c3a25c9be4efaace854c8f2a966360a8634af1fa54df37ebe9552ffb989c82bb91adb2011116395dbedf842f02f64fd740d214110be26bf4a5d
6
+ metadata.gz: b27d101b0eceb2bfeef94aa39a74738bcafbd4d302cd4a845da3bcae955f1c5d8233c9d082351a1cb8c7db39cefb05f04bac2a572201e1296296def92ddda8f1
7
+ data.tar.gz: 6a292515c6497f1e577f9ebcb04efeeeaf2939aa2da47c747804fd2c0f3322e9be0d28f8a6a52641d33b041ed7313c2d5090ccf8fd59592480ed5ea18f3a7a3e
@@ -313,10 +313,10 @@ module Booker
313
313
  return parsed_response['Results'] unless parsed_response['Results'].nil?
314
314
 
315
315
  if booker_model
316
- model_name = booker_model.to_s.demodulize
317
- return parsed_response[model_name] unless parsed_response[model_name].nil?
316
+ response_results_key = booker_model.response_results_key
317
+ return parsed_response[response_results_key] unless parsed_response[response_results_key].nil?
318
318
 
319
- pluralized = model_name.pluralize
319
+ pluralized = response_results_key.pluralize
320
320
  return parsed_response[pluralized] unless parsed_response[pluralized].nil?
321
321
  end
322
322
 
@@ -67,6 +67,12 @@ module Booker
67
67
  end
68
68
  end
69
69
 
70
+ protected
71
+
72
+ def self.response_results_key
73
+ self.to_s.demodulize
74
+ end
75
+
70
76
  private
71
77
 
72
78
  def hash_list(array)
@@ -8,9 +8,6 @@ module Booker
8
8
  'AvailableInAdvanceDateUnitType',
9
9
  'Category',
10
10
  'ColorCode',
11
- 'CustomerRecordType',
12
- 'CustomerTypeID',
13
- 'CustomerTypeName',
14
11
  'DateCreatedOffset',
15
12
  'DateLastModifiedOffset',
16
13
  'DepositOptions',
@@ -19,24 +16,23 @@ module Booker
19
16
  'DoesNotRequireStaff',
20
17
  'DurationType',
21
18
  'EmployeeTreatments',
22
- 'FlexiblePriceIncrementType',
23
19
  'ImageURL',
24
20
  'IsActive',
25
- 'IsBoundingService',
26
21
  'IsClass',
27
22
  'IsDeleted',
28
- 'IsFlexiblePrice',
29
23
  'IsForCouples',
30
- 'IsSharedService',
31
24
  'MaxTreatmentDuration',
32
25
  'MinTreatmentDuration',
33
26
  'Name',
34
27
  'Price',
35
28
  'RequiresTwoTechnicians',
36
- 'SharedRoomGuestCount',
37
29
  'SubCategory',
38
30
  'TotalDuration',
39
31
  'TreatmentDuration'
32
+
33
+ def self.response_results_key
34
+ 'Treatment'
35
+ end
40
36
  end
41
37
  end
42
38
  end
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '3.3.12'
2
+ VERSION = '3.3.13'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booker_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.12
4
+ version: 3.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-01 00:00:00.000000000 Z
11
+ date: 2020-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty