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 +4 -4
- data/lib/booker/v4.1/merchant.rb +1 -3
- data/lib/booker/v4/business_rest.rb +16 -8
- data/lib/booker/v4/customer_rest.rb +4 -4
- data/lib/booker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d78ca447e18ede67da9e55f44a9707d68f92d9ed
|
4
|
+
data.tar.gz: 10eda35b38e15ef2226df5a925013295428897fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dc228c843c3f0e1ae6f2f019416be3249cc7748f54f88358d5c2cabf13d395925d8b96dd2d13f84cb8c1758e318e729e3dcc182bfbc3112bf371513469eab5c
|
7
|
+
data.tar.gz: de787cc5ce3d7669e41f8f73937a9f62b08e3564d24758a34fadad5c78b647c968179e97e79e5920abff210f6d1fb1a7b1e9852defd84560eeae559ac17d2e5f
|
data/lib/booker/v4.1/merchant.rb
CHANGED
@@ -124,9 +124,7 @@ module Booker
|
|
124
124
|
LoadUnpaidAppointments: false,
|
125
125
|
includeFieldValues: false
|
126
126
|
}
|
127
|
-
|
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(
|
24
|
+
def find_locations(params: {})
|
25
25
|
paginated_request(
|
26
26
|
method: :post,
|
27
27
|
path: '/locations',
|
28
|
-
params: build_params({},
|
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,
|
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},
|
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,
|
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},
|
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
|
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,
|
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:,
|
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
|
-
},
|
13
|
+
}, params), Booker::V4::Models::Appointment
|
14
14
|
end
|
15
15
|
|
16
|
-
def create_class_appointment(booker_location_id:, class_instance_id:, customer:,
|
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
|
-
},
|
21
|
+
}, params), Booker::V4::Models::Appointment
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/lib/booker/version.rb
CHANGED