booker_ruby 3.0.9 → 3.1.0

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
  SHA1:
3
- metadata.gz: 38393c1d2fad9767032e92fbe975ba26348c3776
4
- data.tar.gz: 7115c50c535d3b55135965a23abef98dfd5c9b04
3
+ metadata.gz: d78ca447e18ede67da9e55f44a9707d68f92d9ed
4
+ data.tar.gz: 10eda35b38e15ef2226df5a925013295428897fa
5
5
  SHA512:
6
- metadata.gz: 306452b34395be407432e7f08afb8bcac27408b649631a68c62cd6519f2d4f8bbf25e55b5c4f3e298490e9a8b1ad70759d0c67ca74b2eb84587bc08f3d4a7300
7
- data.tar.gz: 00d34f8671b14f7b36b59b4450b95bcec104082fc0cd82353699c92fc51350e61d657c1e603c49142b8d8f273430237aec7d5db8fa59313c777debddd347bc84
6
+ metadata.gz: 1dc228c843c3f0e1ae6f2f019416be3249cc7748f54f88358d5c2cabf13d395925d8b96dd2d13f84cb8c1758e318e729e3dcc182bfbc3112bf371513469eab5c
7
+ data.tar.gz: de787cc5ce3d7669e41f8f73937a9f62b08e3564d24758a34fadad5c78b647c968179e97e79e5920abff210f6d1fb1a7b1e9852defd84560eeae559ac17d2e5f
@@ -124,9 +124,7 @@ module Booker
124
124
  LoadUnpaidAppointments: false,
125
125
  includeFieldValues: false
126
126
  }
127
- response = get("#{V41_PREFIX}/customer/#{id}",
128
- build_params(additional_params, params),
129
- Booker::V4::Models::Customer)
127
+ get("#{V41_PREFIX}/customer/#{id}", build_params(additional_params, params), Booker::V4::Models::Customer)
130
128
  end
131
129
 
132
130
  def create_special(location_id:, start_date:, end_date:, coupon_code:, name:, params: {})
@@ -21,30 +21,30 @@ module Booker
21
21
  response['LocationDaySchedules'].map { |sched| Booker::V4::Models::LocationDaySchedule.from_hash(sched) }
22
22
  end
23
23
 
24
- def find_locations(options: {})
24
+ def find_locations(params: {})
25
25
  paginated_request(
26
26
  method: :post,
27
27
  path: '/locations',
28
- params: build_params({}, options, true),
28
+ params: build_params({}, params, true),
29
29
  model: Booker::V4::Models::Location
30
30
  )
31
31
  end
32
32
 
33
- def find_employees(booker_location_id:, fetch_all: true, options: {})
33
+ def find_employees(booker_location_id:, fetch_all: true, params: {})
34
34
  paginated_request(
35
35
  method: :post,
36
36
  path: '/employees',
37
- params: build_params({LocationID: booker_location_id}, options, true),
37
+ params: build_params({LocationID: booker_location_id}, params, true),
38
38
  model: Booker::V4::Models::Employee,
39
39
  fetch_all: fetch_all
40
40
  )
41
41
  end
42
42
 
43
- def find_treatments(booker_location_id:, fetch_all: true, options: {})
43
+ def find_treatments(booker_location_id:, fetch_all: true, params: {})
44
44
  paginated_request(
45
45
  method: :post,
46
46
  path: '/treatments',
47
- params: build_params({LocationID: booker_location_id}, options, true),
47
+ params: build_params({LocationID: booker_location_id}, params, true),
48
48
  model: Booker::V4::Models::Treatment,
49
49
  fetch_all: fetch_all
50
50
  )
@@ -66,7 +66,15 @@ module Booker
66
66
  )
67
67
  end
68
68
 
69
- def find_appointments_partial(booker_location_id:, start_date:, end_date:, fetch_all: true, options: {})
69
+ def get_customer(id:, params: {})
70
+ additional_params = {
71
+ LoadUnpaidAppointments: false,
72
+ includeFieldValues: false
73
+ }
74
+ get("/customer/#{id}", build_params(additional_params, params), Booker::V4::Models::Customer)
75
+ end
76
+
77
+ def find_appointments_partial(booker_location_id:, start_date:, end_date:, fetch_all: true, params: {})
70
78
  additional_params = {
71
79
  LocationID: booker_location_id,
72
80
  FromStartDate: start_date.to_date,
@@ -76,7 +84,7 @@ module Booker
76
84
  paginated_request(
77
85
  method: :post,
78
86
  path: '/appointments/partial',
79
- params: build_params(additional_params, options, true),
87
+ params: build_params(additional_params, params, true),
80
88
  model: Booker::V4::Models::Appointment,
81
89
  fetch_all: fetch_all
82
90
  )
@@ -3,22 +3,22 @@ module Booker
3
3
  module CustomerREST
4
4
  include Booker::V4::CommonREST
5
5
 
6
- def create_appointment(booker_location_id:, available_time:, customer:, options: {})
6
+ def create_appointment(booker_location_id:, available_time:, customer:, params: {})
7
7
  post '/appointment/create', build_params({
8
8
  'LocationID' => booker_location_id,
9
9
  'ItineraryTimeSlotList' => [
10
10
  'TreatmentTimeSlots' => [available_time]
11
11
  ],
12
12
  'Customer' => customer
13
- }, options), Booker::V4::Models::Appointment
13
+ }, params), Booker::V4::Models::Appointment
14
14
  end
15
15
 
16
- def create_class_appointment(booker_location_id:, class_instance_id:, customer:, options: {})
16
+ def create_class_appointment(booker_location_id:, class_instance_id:, customer:, params: {})
17
17
  post '/class_appointment/create', build_params({
18
18
  LocationID: booker_location_id,
19
19
  ClassInstanceID: class_instance_id,
20
20
  Customer: customer
21
- }, options), Booker::V4::Models::Appointment
21
+ }, params), Booker::V4::Models::Appointment
22
22
  end
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '3.0.9'
2
+ VERSION = '3.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booker_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.9
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick