booker_ruby 3.3.14 → 3.3.15

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: a59c9a5ac124cb43252ca885779b58d0e87e0ad755822480edd8f8a3b4ca6723
4
- data.tar.gz: 5a4dc508435b84255c95f4e6c57c3e8732806262dabc683a057516627614cec0
3
+ metadata.gz: 513901ea61d46fb2627dbf2832aaf50a32c486e6033c8b58aaf89a1c49d37c73
4
+ data.tar.gz: 99b08afcac63f583be1190f369117bd6c89da59ba3bb3564b7af943737c40173
5
5
  SHA512:
6
- metadata.gz: eaed9aca5f53e5fcf891ec5a1af9c4555885fd99164e78d9234542b1ddf747a611bdeb2d4912de295e87870b6369119358353d186e2eb399048fd990e877293e
7
- data.tar.gz: 38d3b6d2aa26ef2eece7395d0f84507835b8201b95a6f117b332302f67ff4ba915971683835d4e8da51cec6d48924e99ee5055f7e79e1f90d2484201bdb293e6
6
+ metadata.gz: bf91284325c8308e96b93c5c5caabc61d4c28c62e1bfec94f6f4ec6c32c7c7ce7ce53ec03adbac3a0aea088cec3bdcf8604d616a9ec13fada7267684a56118c1
7
+ data.tar.gz: 2dcab1cab3814be62ca6c45517d389bed9593ebc58a6181bd548f360d3721f3c4d7e06d89285b9944d21f787a3438df46a60c80c568d8d2febe7126c46160668
@@ -16,7 +16,8 @@ module Booker
16
16
  treatments_verified_bookable_online: "#{V41_PREFIX}/treatments/online".freeze,
17
17
  location: "#{V41_PREFIX}/location".freeze,
18
18
  locations: "#{V41_PREFIX}/locations".freeze,
19
- class_availability: "#{V41_PREFIX}/availability/class".freeze
19
+ class_availability: "#{V41_PREFIX}/availability/class".freeze,
20
+ specials: "#{V41_PREFIX}/specials".freeze
20
21
  }.freeze
21
22
 
22
23
  def appointment(id:)
@@ -81,6 +82,16 @@ module Booker
81
82
  )
82
83
  end
83
84
 
85
+ def specials(location_id:, fetch_all: true, params: {})
86
+ paginated_request(
87
+ method: :post,
88
+ path: API_METHODS[:specials],
89
+ params: build_params({ LocationID: location_id }, params, true),
90
+ model: Booker::V4::Models::Special,
91
+ fetch_all: fetch_all
92
+ )
93
+ end
94
+
84
95
  def location(id:)
85
96
  response = get("#{API_METHODS[:location]}/#{id}", build_params)
86
97
  Booker::V4::Models::Location.from_hash(response)
@@ -0,0 +1,12 @@
1
+ module Booker
2
+ module V4
3
+ module Models
4
+ class PriceRange < Model
5
+ attr_accessor 'From',
6
+ 'To',
7
+ 'DiscountType',
8
+ 'DiscountAmount'
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,10 @@
1
+ module Booker
2
+ module V4
3
+ module Models
4
+ class PriceRangeScope < Model
5
+ attr_accessor 'ID',
6
+ 'Name'
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,46 @@
1
+ module Booker
2
+ module V4
3
+ module Models
4
+ class Special < Model
5
+ attr_accessor 'ID',
6
+ 'LocationID',
7
+ 'Name',
8
+ 'Description',
9
+ 'CouponCode',
10
+ 'Type',
11
+ 'ShortUrl',
12
+ 'ApplicableStartDate',
13
+ 'ApplicableEndDate',
14
+ 'BookingStartDate',
15
+ 'BookingEndDate',
16
+ 'MaxRedemptions',
17
+ 'TimeOfDayStart',
18
+ 'TimeOfDayEnd',
19
+ 'HasTreatment',
20
+ 'WeekDays',
21
+ 'UsePriceRanges',
22
+ 'PriceRanges',
23
+ 'DiscountType',
24
+ 'AdjustmentType',
25
+ 'DiscountAmount',
26
+ 'CanCustomerDirectBook',
27
+ 'HideOnInvoicesAndReceipts',
28
+ 'PhotoUrl',
29
+ 'UsedRedemptions',
30
+ 'AvailableRedemptions',
31
+ 'HasFreeItems',
32
+ 'PriceRangeScope',
33
+ 'ApplicationItemIDs',
34
+ 'IsExclusiveWithAll',
35
+ 'IsExclusiveWithAny',
36
+ 'CombinationRules',
37
+ 'ApplicableStartDateOffset',
38
+ 'ApplicableEndDateOffset',
39
+ 'BookingStartDateOffset',
40
+ 'BookingEndDateOffset',
41
+ 'TimeOfDayStartOffset',
42
+ 'TimeOfDayEndOffset'
43
+ end
44
+ end
45
+ end
46
+ end
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '3.3.14'
2
+ VERSION = '3.3.15'
3
3
  end
@@ -92,6 +92,9 @@ require 'booker/v4/models/treatment'
92
92
  require 'booker/v4/models/treatment_time_slot'
93
93
  require 'booker/v4/models/treatment_verified_bookable_online'
94
94
  require 'booker/v4/models/user'
95
+ require 'booker/v4/models/special'
96
+ require 'booker/v4/models/price_range'
97
+ require 'booker/v4/models/price_range_scope'
95
98
 
96
99
  # V5 Models
97
100
  require 'booker/v5/models/model'
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.14
4
+ version: 3.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-18 00:00:00.000000000 Z
11
+ date: 2020-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -196,12 +196,15 @@ files:
196
196
  - lib/booker/v4/models/payment_method.rb
197
197
  - lib/booker/v4/models/preferred_staff_gender.rb
198
198
  - lib/booker/v4/models/price.rb
199
+ - lib/booker/v4/models/price_range.rb
200
+ - lib/booker/v4/models/price_range_scope.rb
199
201
  - lib/booker/v4/models/receipt_display_price.rb
200
202
  - lib/booker/v4/models/room.rb
201
203
  - lib/booker/v4/models/shipping_address.rb
202
204
  - lib/booker/v4/models/source.rb
203
205
  - lib/booker/v4/models/spa.rb
204
206
  - lib/booker/v4/models/spa_employee_availability_search_item.rb
207
+ - lib/booker/v4/models/special.rb
205
208
  - lib/booker/v4/models/status.rb
206
209
  - lib/booker/v4/models/sub_category.rb
207
210
  - lib/booker/v4/models/tag_price.rb