booker_api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/booker/booker.rb +5 -0
- data/lib/booker/business_client.rb +22 -0
- data/lib/booker/business_rest.rb +130 -0
- data/lib/booker/client.rb +212 -0
- data/lib/booker/common_rest.rb +49 -0
- data/lib/booker/config/booker_country_ids_to_iso_codes.yml +269 -0
- data/lib/booker/customer_client.rb +17 -0
- data/lib/booker/customer_rest.rb +169 -0
- data/lib/booker/errors.rb +24 -0
- data/lib/booker/generic_token_store.rb +25 -0
- data/lib/booker/helpers/active_support_helper.rb +102 -0
- data/lib/booker/helpers/logging_helper.rb +11 -0
- data/lib/booker/models/address.rb +12 -0
- data/lib/booker/models/appointment.rb +77 -0
- data/lib/booker/models/appointment_treatment.rb +51 -0
- data/lib/booker/models/available_time.rb +13 -0
- data/lib/booker/models/business_type.rb +5 -0
- data/lib/booker/models/category.rb +5 -0
- data/lib/booker/models/class_instance.rb +25 -0
- data/lib/booker/models/country.rb +19 -0
- data/lib/booker/models/current_price.rb +5 -0
- data/lib/booker/models/customer.rb +52 -0
- data/lib/booker/models/customer_2.rb +5 -0
- data/lib/booker/models/customer_record_type.rb +5 -0
- data/lib/booker/models/discount.rb +5 -0
- data/lib/booker/models/dynamic_price.rb +11 -0
- data/lib/booker/models/employee.rb +10 -0
- data/lib/booker/models/feature_settings.rb +7 -0
- data/lib/booker/models/final_total.rb +5 -0
- data/lib/booker/models/gender.rb +5 -0
- data/lib/booker/models/itinerary_time_slot.rb +7 -0
- data/lib/booker/models/itinerary_time_slots_list.rb +7 -0
- data/lib/booker/models/location.rb +23 -0
- data/lib/booker/models/location_day_schedule.rb +18 -0
- data/lib/booker/models/model.rb +150 -0
- data/lib/booker/models/multi_service_availability_result.rb +7 -0
- data/lib/booker/models/notification_settings.rb +12 -0
- data/lib/booker/models/online_booking_settings.rb +23 -0
- data/lib/booker/models/original_price.rb +5 -0
- data/lib/booker/models/payment_method.rb +5 -0
- data/lib/booker/models/preferred_staff_gender.rb +5 -0
- data/lib/booker/models/price.rb +8 -0
- data/lib/booker/models/receipt_display_price.rb +5 -0
- data/lib/booker/models/room.rb +12 -0
- data/lib/booker/models/shipping_address.rb +5 -0
- data/lib/booker/models/source.rb +5 -0
- data/lib/booker/models/spa.rb +5 -0
- data/lib/booker/models/spa_employee_availability_search_item.rb +11 -0
- data/lib/booker/models/status.rb +5 -0
- data/lib/booker/models/sub_category.rb +5 -0
- data/lib/booker/models/tag_price.rb +5 -0
- data/lib/booker/models/teacher.rb +5 -0
- data/lib/booker/models/teacher_2.rb +5 -0
- data/lib/booker/models/time_zone.rb +8 -0
- data/lib/booker/models/treatment.rb +19 -0
- data/lib/booker/models/treatment_time_slot.rb +5 -0
- data/lib/booker/models/type.rb +8 -0
- data/lib/booker/models/user.rb +73 -0
- data/lib/booker/version.rb +3 -0
- data/lib/booker_api.rb +97 -0
- metadata +216 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
module Booker
|
2
|
+
class CustomerClient < Client
|
3
|
+
include Booker::CustomerREST
|
4
|
+
|
5
|
+
def initialize(options={})
|
6
|
+
super
|
7
|
+
self.token_store ||= GenericTokenStore
|
8
|
+
self.token_store_callback_method ||= :update_booker_access_token!
|
9
|
+
end
|
10
|
+
|
11
|
+
def env_base_url_key; 'BOOKER_CUSTOMER_SERVICE_URL'; end
|
12
|
+
|
13
|
+
def default_base_url; 'https://apicurrent-app.booker.ninja/webservice4/json/CustomerService.svc'; end
|
14
|
+
|
15
|
+
def access_token_options; super.merge!(grant_type: 'client_credentials'); end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,169 @@
|
|
1
|
+
module Booker
|
2
|
+
module CustomerREST
|
3
|
+
include CommonREST
|
4
|
+
|
5
|
+
def get_customer_appointments(customer_id, custom_access_token, options = {})
|
6
|
+
get "/customer/#{customer_id}/appointments", build_params(options, custom_access_token)
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_appointment(booker_location_id, start_time, treatment_ids, incomplete_appoinment_id, customer, credit_card, coupon_code = nil, notes = nil, custom_access_token = {}, options: {})
|
10
|
+
post "/appointment/create", build_params({
|
11
|
+
"LocationID" => booker_location_id,
|
12
|
+
"ItineraryTimeSlotList" => [
|
13
|
+
"StartDateTime" => start_time,
|
14
|
+
"TreatmentTimeSlots" => treatment_ids.map { |id|
|
15
|
+
{
|
16
|
+
"StartDateTime" => start_time,
|
17
|
+
"TreatmentID" => id
|
18
|
+
}
|
19
|
+
}
|
20
|
+
],
|
21
|
+
"AppointmentPayment" => {
|
22
|
+
"PaymentItem" => {
|
23
|
+
"CreditCard" => credit_card,
|
24
|
+
"Method" => {
|
25
|
+
"ID" => 1
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"CouponCode" => coupon_code
|
29
|
+
},
|
30
|
+
"Notes" => notes,
|
31
|
+
"IncompleteAppointmentID" => incomplete_appoinment_id,
|
32
|
+
"Customer" => customer
|
33
|
+
}, custom_access_token.merge(options)), Booker::Models::Appointment
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_incomplete_appointment(booker_location_id, start_time, treatment_ids, options = {})
|
37
|
+
post '/appointment/createincomplete', build_params({
|
38
|
+
'LocationID' => booker_location_id,
|
39
|
+
'ItineraryTimeSlot' => {
|
40
|
+
'StartDateTime' => start_time,
|
41
|
+
'TreatmentTimeSlots' => treatment_ids.map { |id| { 'StartDateTime' => start_time, 'TreatmentID' => id } }
|
42
|
+
}
|
43
|
+
}, options)
|
44
|
+
end
|
45
|
+
|
46
|
+
def create_class_appointment(booker_location_id, class_instance_id, customer, options = {})
|
47
|
+
post '/class_appointment/create', build_params({
|
48
|
+
'LocationID' => booker_location_id,
|
49
|
+
'ClassInstanceID' => class_instance_id,
|
50
|
+
'Customer' => customer
|
51
|
+
}, options), Booker::Models::Appointment
|
52
|
+
end
|
53
|
+
|
54
|
+
def calculate_appointment_cost(booker_location_id, appointment_id, coupon_code, options = {})
|
55
|
+
post '/appointment/prebooking/totalcost', build_params({
|
56
|
+
'LocationID' => booker_location_id,
|
57
|
+
'AppointmentID' => appointment_id,
|
58
|
+
'CouponCode' => coupon_code,
|
59
|
+
'AppointmentDate' => DateTime.now,
|
60
|
+
'AppointmentTreatmentDTOs' => []
|
61
|
+
}, options)
|
62
|
+
end
|
63
|
+
|
64
|
+
def run_multi_spa_multi_sub_category_availability(booker_location_ids, treatment_sub_category_ids, start_date_time, end_date_time, options = {})
|
65
|
+
post '/availability/multispamultisubcategory', build_params({
|
66
|
+
'LocationIDs' => booker_location_ids,
|
67
|
+
'TreatmentSubCategoryIDs' => treatment_sub_category_ids,
|
68
|
+
'StartDateTime' => start_date_time,
|
69
|
+
'EndDateTime' => end_date_time,
|
70
|
+
'MaxTimesPerTreatment' => 1000
|
71
|
+
}, options), Booker::Models::SpaEmployeeAvailabilitySearchItem
|
72
|
+
end
|
73
|
+
|
74
|
+
def run_multi_service_availability(booker_location_id, treatment_ids, start_date_time, end_date_time, employee_id = nil, options = {})
|
75
|
+
treatment_ids = [treatment_ids] unless treatment_ids.respond_to?(:map)
|
76
|
+
post '/availability/multiservice', build_params(
|
77
|
+
{
|
78
|
+
'LocationID' => booker_location_id,
|
79
|
+
'StartDateTime' => start_date_time,
|
80
|
+
'EndDateTime' => end_date_time,
|
81
|
+
'MaxTimesPerDay' => 100,
|
82
|
+
'Itineraries' => treatment_ids.map { |id| { 'Treatments' => [{ 'TreatmentID' => id, 'EmployeeID' => employee_id }] } }
|
83
|
+
}, options
|
84
|
+
), Booker::Models::MultiServiceAvailabilityResult
|
85
|
+
end
|
86
|
+
|
87
|
+
def run_class_availability(booker_location_id, from_start_date_time, to_start_date_time, options = {})
|
88
|
+
post '/availability/class', build_params({
|
89
|
+
'FromStartDateTime' => from_start_date_time,
|
90
|
+
'LocationID' => booker_location_id,
|
91
|
+
'OnlyIfAvailable' => true,
|
92
|
+
'ToStartDateTime' => to_start_date_time,
|
93
|
+
'ExcludeClosedDates' => true
|
94
|
+
}, options), Booker::Models::ClassInstance
|
95
|
+
end
|
96
|
+
|
97
|
+
def find_treatments(booker_location_id, category_id = nil)
|
98
|
+
post '/treatments', build_params({
|
99
|
+
'LocationID' => booker_location_id,
|
100
|
+
'CategoryID' => category_id
|
101
|
+
})
|
102
|
+
end
|
103
|
+
|
104
|
+
def get_treatment_categories(booker_location_id)
|
105
|
+
get '/treatment_categories', build_params({
|
106
|
+
'location_id' => booker_location_id
|
107
|
+
})
|
108
|
+
end
|
109
|
+
|
110
|
+
def get_locations
|
111
|
+
post '/locations', build_params
|
112
|
+
end
|
113
|
+
|
114
|
+
def find_employees(booker_location_id)
|
115
|
+
post '/employees', build_params({
|
116
|
+
'LocationID' => booker_location_id
|
117
|
+
})
|
118
|
+
end
|
119
|
+
|
120
|
+
def get_customer(customer_id, custom_access_token, options = {})
|
121
|
+
get "/customer/#{customer_id}", build_params(options, custom_access_token)
|
122
|
+
end
|
123
|
+
|
124
|
+
def create_customer(booker_location_id, customer_data, options: {})
|
125
|
+
post '/customer/account', build_params({
|
126
|
+
'LocationID' => booker_location_id,
|
127
|
+
'Email' => customer_data[:email],
|
128
|
+
'Password' => customer_data[:password],
|
129
|
+
'FirstName' => customer_data[:first_name],
|
130
|
+
'LastName' => customer_data[:last_name],
|
131
|
+
'HomePhone' => customer_data[:HomePhone],
|
132
|
+
'CellPhone' => customer_data[:CellPhone],
|
133
|
+
'AllowReceiveEmails' => customer_data[:AllowReceiveEmails],
|
134
|
+
'AllowReceiveSMS' => customer_data[:AllowReceiveSMS]
|
135
|
+
}, options)
|
136
|
+
end
|
137
|
+
|
138
|
+
def update_customer(customer_id, customer_data, custom_access_token = {})
|
139
|
+
put "/customer/#{customer_id}", build_params(customer_data, custom_access_token)
|
140
|
+
end
|
141
|
+
|
142
|
+
def login(booker_location_id, email, password, options: {})
|
143
|
+
post '/customer/login', build_params({
|
144
|
+
'LocationID' => booker_location_id,
|
145
|
+
'Email' => email,
|
146
|
+
'Password' => password
|
147
|
+
}, options.merge({
|
148
|
+
client_id: self.client_id,
|
149
|
+
client_secret: self.client_secret
|
150
|
+
}))
|
151
|
+
end
|
152
|
+
|
153
|
+
def forgot_password(booker_location_id, email, first_name, base_url, options: {})
|
154
|
+
post '/forgot_password/custom', build_params({
|
155
|
+
'LocationID' => booker_location_id,
|
156
|
+
'Email' => email,
|
157
|
+
'Firstname' => first_name,
|
158
|
+
'BaseUrlOfHost' => base_url
|
159
|
+
}, options)
|
160
|
+
end
|
161
|
+
|
162
|
+
def reset_password(key, password, options: {})
|
163
|
+
post '/password/reset', build_params({
|
164
|
+
'Key' => key,
|
165
|
+
'Password' => password
|
166
|
+
}, options)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Booker
|
2
|
+
class Error < StandardError
|
3
|
+
attr_accessor :error, :description, :url, :request, :response, :argument_errors
|
4
|
+
|
5
|
+
def initialize(url: nil, request: nil, response: nil)
|
6
|
+
if request.present?
|
7
|
+
self.request = request
|
8
|
+
end
|
9
|
+
|
10
|
+
if response.present?
|
11
|
+
self.response = response
|
12
|
+
error = response
|
13
|
+
error = response["Fault"]["Detail"]["InternalErrorFault"] if response["Fault"]
|
14
|
+
self.error = error['error'] || error['ErrorMessage']
|
15
|
+
self.description = error['error_description']
|
16
|
+
self.argument_errors = error["ArgumentErrors"].map { |a| { :attr => a["ArgumentName"], :message => a["ErrorMessage"] } } unless error["ArgumentErrors"].nil?
|
17
|
+
end
|
18
|
+
|
19
|
+
self.url = url
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class InvalidApiCredentials < Error; end
|
24
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Booker
|
2
|
+
class GenericTokenStore
|
3
|
+
def self.temp_access_token
|
4
|
+
@temp_access_token
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.temp_access_token=(token)
|
8
|
+
@temp_access_token = token
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.temp_access_token_expires_at
|
12
|
+
@temp_access_token_expires_at
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.temp_access_token_expires_at=(expires_at)
|
16
|
+
@temp_access_token_expires_at = expires_at
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.update_booker_access_token!(token, expires_at)
|
20
|
+
self.temp_access_token = token
|
21
|
+
self.temp_access_token_expires_at = expires_at
|
22
|
+
true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
module Booker
|
2
|
+
module Helpers
|
3
|
+
module ActiveSupport
|
4
|
+
BOOKER_TO_ACTIVE_SUPPORT_TIMEZONE = {
|
5
|
+
'(GMT-12:00) International Date Line West' => 'International Date Line West',
|
6
|
+
'(GMT-11:00) Midway Island, Samoa' => 'Samoa',
|
7
|
+
'(GMT-10:00) Hawaii' => 'Hawaii',
|
8
|
+
'(GMT-09:00) Alaska' => 'Alaska',
|
9
|
+
'(GMT-08:00) Tijuana, Baja California' => 'Tijuana',
|
10
|
+
'(GMT-08:00) Pacific Time (US & Canada)' => 'Pacific Time (US & Canada)',
|
11
|
+
'(GMT-07:00) Chihuahua, La Paz, Mazatlan - New' => 'Chihuahua',
|
12
|
+
'(GMT-07:00) Arizona' => 'Arizona',
|
13
|
+
'(GMT-07:00) Mountain Time (US & Canada)' => 'Mountain Time (US & Canada)',
|
14
|
+
'(GMT-07:00) Chihuahua, La Paz, Mazatlan - Old' => 'Chihuahua',
|
15
|
+
'(GMT-06:00) Guadalajara, Mexico City, Monterrey - New' => 'Guadalajara',
|
16
|
+
'(GMT-06:00) Central Time (US & Canada)' => 'Central Time (US & Canada)',
|
17
|
+
'(GMT-06:00) Central America' => 'Central America',
|
18
|
+
'(GMT-06:00) Guadalajara, Mexico City, Monterrey - Old' => 'Guadalajara',
|
19
|
+
'(GMT-06:00) Saskatchewan' => 'Saskatchewan',
|
20
|
+
'(GMT-05:00) Bogota, Lima, Quito, Rio Branco' => 'Bogota',
|
21
|
+
'(GMT-05:00) Indiana (East)' => 'Indiana (East)',
|
22
|
+
'(GMT-05:00) Eastern Time (US & Canada)' => 'Eastern Time (US & Canada)',
|
23
|
+
'(GMT-04:00) Santiago' => 'Santiago',
|
24
|
+
'(GMT-04:00) Caracas, La Paz' => 'Caracas',
|
25
|
+
'(GMT-04:00) Atlantic Time (Canada)' => 'Atlantic Time (Canada)',
|
26
|
+
'(GMT-04:00) Manaus' => 'Atlantic Time (Canada)',
|
27
|
+
'(GMT-03:30) Newfoundland' => 'Newfoundland',
|
28
|
+
'(GMT-03:00) Brasilia' => 'Brasilia',
|
29
|
+
'(GMT-03:00) Greenland' => 'Greenland',
|
30
|
+
'(GMT-03:00) Montevideo' => 'Montevideo',
|
31
|
+
'(GMT-03:00) Buenos Aires, Georgetown' => 'Buenos Aires',
|
32
|
+
'(GMT-02:00) Mid-Atlantic' => 'Mid-Atlantic',
|
33
|
+
'(GMT-01:00) Cape Verde Is.' => 'Cape Verde Is.',
|
34
|
+
'(GMT-01:00) Azores' => 'Azores',
|
35
|
+
'(GMT) Casablanca, Monrovia, Reykjavik' => 'Casablanca',
|
36
|
+
'(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London' => 'Dublin',
|
37
|
+
'(GMT+01:00) West Central Africa' => 'West Central Africa',
|
38
|
+
'(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb' => 'Sarajevo',
|
39
|
+
'(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna' => 'Amsterdam',
|
40
|
+
'(GMT+01:00) Brussels, Copenhagen, Madrid, Paris' => 'Brussels',
|
41
|
+
'(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague' => 'Belgrade',
|
42
|
+
'(GMT+02:00) Windhoek' => 'Harare',
|
43
|
+
'(GMT+02:00) Jerusalem' => 'Jerusalem',
|
44
|
+
'(GMT+02:00) Amman' => 'Jerusalem',
|
45
|
+
'(GMT+02:00) Beirut' => 'Jerusalem',
|
46
|
+
'(GMT+02:00) Harare, Pretoria' => 'Harare',
|
47
|
+
'(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius' => 'Helsinki',
|
48
|
+
'(GMT+02:00) Cairo' => 'Cairo',
|
49
|
+
'(GMT+02:00) Minsk' => 'Minsk',
|
50
|
+
'(GMT+02:00) Athens, Bucharest, Istanbul' => 'Athens',
|
51
|
+
'(GMT+03:00) Moscow, St. Petersburg, Volgograd' => 'Moscow',
|
52
|
+
'(GMT+03:00) Nairobi' => 'Nairobi',
|
53
|
+
'(GMT+03:00) Kuwait, Riyadh' => 'Kuwait',
|
54
|
+
'(GMT+03:00) Tbilisi' => 'Tbilisi',
|
55
|
+
'(GMT+03:00) Baghdad' => 'Baghdad',
|
56
|
+
'(GMT+03:30) Tehran' => 'Tehran',
|
57
|
+
'(GMT+04:00) Caucasus Standard Time' => 'Yerevan',
|
58
|
+
'(GMT+04:00) Yerevan' => 'Yerevan',
|
59
|
+
'(GMT+04:00) Abu Dhabi, Muscat' => 'Abu Dhabi',
|
60
|
+
'(GMT+04:00) Baku' => 'Baku',
|
61
|
+
'(GMT+04:30) Kabul' => 'Kabul',
|
62
|
+
'(GMT+05:00) Ekaterinburg' => 'Ekaterinburg',
|
63
|
+
'(GMT+05:00) Islamabad, Karachi, Tashkent' => 'Islamabad',
|
64
|
+
'(GMT+05:30) Sri Jayawardenepura' => 'Sri Jayawardenepura',
|
65
|
+
'(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi' => 'Chennai',
|
66
|
+
'(GMT+05:45) Kathmandu' => 'Kathmandu',
|
67
|
+
'(GMT+06:00) Almaty, Novosibirsk' => 'Almaty',
|
68
|
+
'(GMT+06:00) Astana, Dhaka' => 'Astana',
|
69
|
+
'(GMT+06:30) Yangon (Rangoon)' => 'Rangoon',
|
70
|
+
'(GMT+07:00) Bangkok, Hanoi, Jakarta' => 'Bangkok',
|
71
|
+
'(GMT+07:00) Krasnoyarsk' => 'Krasnoyarsk',
|
72
|
+
'(GMT+08:00) Taipei' => 'Taipei',
|
73
|
+
'(GMT+08:00) Kuala Lumpur, Singapore' => 'Kuala Lumpur',
|
74
|
+
'(GMT+08:00) Irkutsk, Ulaan Bataar' => 'Irkutsk',
|
75
|
+
'(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi' => 'Beijing',
|
76
|
+
'(GMT+08:00) Perth' => 'Perth',
|
77
|
+
'(GMT+09:00) Osaka, Sapporo, Tokyo' => 'Osaka',
|
78
|
+
'(GMT+09:00) Seoul' => 'Seoul',
|
79
|
+
'(GMT+09:00) Yakutsk' => 'Yakutsk',
|
80
|
+
'(GMT+09:30) Darwin' => 'Darwin',
|
81
|
+
'(GMT+09:30) Adelaide' => 'Adelaide',
|
82
|
+
'(GMT+10:00) Hobart' => 'Hobart',
|
83
|
+
'(GMT+10:00) Brisbane' => 'Brisbane',
|
84
|
+
'(GMT+10:00) Vladivostok' => 'Vladivostok',
|
85
|
+
'(GMT+10:00) Guam, Port Moresby' => 'Guam',
|
86
|
+
'(GMT+10:00) Canberra, Melbourne, Sydney' => 'Canberra',
|
87
|
+
'(GMT+11:00) Magadan, Solomon Is., New Caledonia' => 'Magadan',
|
88
|
+
'(GMT+12:00) Fiji, Kamchatka, Marshall Is.' => 'Fiji',
|
89
|
+
'(GMT+12:00) Auckland, Wellington' => 'Auckland',
|
90
|
+
"(GMT+13:00) Nuku'alofa" => "Nuku'alofa"
|
91
|
+
}.freeze
|
92
|
+
|
93
|
+
def self.to_active_support(booker_timezone_name)
|
94
|
+
BOOKER_TO_ACTIVE_SUPPORT_TIMEZONE[booker_timezone_name]
|
95
|
+
end
|
96
|
+
|
97
|
+
def self.booker_timezone_names
|
98
|
+
BOOKER_TO_ACTIVE_SUPPORT_TIMEZONE.keys
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module Booker
|
2
|
+
module Models
|
3
|
+
class Appointment < Model
|
4
|
+
attr_accessor 'BookingNumber',
|
5
|
+
'Confirmable',
|
6
|
+
'EndDateTime',
|
7
|
+
'FinalTotal',
|
8
|
+
'ID',
|
9
|
+
'IsCancelled',
|
10
|
+
'IsNoShow',
|
11
|
+
'LocationID',
|
12
|
+
'StartDateTime',
|
13
|
+
'Status',
|
14
|
+
'CanTakePayment',
|
15
|
+
'DateCreated',
|
16
|
+
'BelongsToEnrollment',
|
17
|
+
'Address',
|
18
|
+
'AddressID',
|
19
|
+
'AllowAutoPay',
|
20
|
+
'AppointmentTreatments',
|
21
|
+
'BelongsToGroup',
|
22
|
+
'BelongsToGroupAndGroupOrder',
|
23
|
+
'BelongsToOrder',
|
24
|
+
'CanCancel',
|
25
|
+
'CanCheckin',
|
26
|
+
'CanHaveCustomer2',
|
27
|
+
'CanRevertNoShow',
|
28
|
+
'CanUndoCheckin',
|
29
|
+
'CancellationID',
|
30
|
+
'Customer',
|
31
|
+
'Customer2',
|
32
|
+
'Customer2ID',
|
33
|
+
'CustomerID',
|
34
|
+
'CustomerLastName',
|
35
|
+
'CustomerMobilePhone',
|
36
|
+
'CustomerWorkPhone',
|
37
|
+
'DateBooked',
|
38
|
+
'DateNoShow',
|
39
|
+
'Employee',
|
40
|
+
'EmployeeFirstName',
|
41
|
+
'EmployeeLastName',
|
42
|
+
'GroupID',
|
43
|
+
'GroupName',
|
44
|
+
'GroupNumber',
|
45
|
+
'GroupTypeID',
|
46
|
+
'IsCancelledOrNoShow',
|
47
|
+
'IsCheckedInInService',
|
48
|
+
'IsPartOfClassPackageBooking',
|
49
|
+
'IsPreBookedAtPastCheckout',
|
50
|
+
'IsRecurring',
|
51
|
+
'IsWebBooking',
|
52
|
+
'Notes',
|
53
|
+
'OrderID',
|
54
|
+
'OrderStatusID',
|
55
|
+
'PackageID',
|
56
|
+
'PaymentID',
|
57
|
+
'PaymentItemID',
|
58
|
+
'PrimaryAppointmentTreatmentID',
|
59
|
+
'RecurrenceID',
|
60
|
+
'Room',
|
61
|
+
'Source',
|
62
|
+
'Treatment',
|
63
|
+
'TreatmentName',
|
64
|
+
'Type',
|
65
|
+
'IsHeld',
|
66
|
+
'HoldForMinutes',
|
67
|
+
'HeldSince',
|
68
|
+
'IsServiceComplete',
|
69
|
+
'IsCheckout',
|
70
|
+
'DateCheckIn',
|
71
|
+
'IsFromWaitList',
|
72
|
+
'IsFromClassWaitList',
|
73
|
+
'CustomerRecordTypeID',
|
74
|
+
'CustomerParentID'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module Booker
|
2
|
+
module Models
|
3
|
+
class AppointmentTreatment < Model
|
4
|
+
attr_accessor 'AppointmentID',
|
5
|
+
'DynamicPrice',
|
6
|
+
'EndDateTime',
|
7
|
+
'ID',
|
8
|
+
'StartDateTime',
|
9
|
+
'ChildID',
|
10
|
+
'ChildName',
|
11
|
+
'AllowChangeStartTime',
|
12
|
+
'DynamicPriceID',
|
13
|
+
'Employee',
|
14
|
+
'Employee2FullName',
|
15
|
+
'Employee2ID',
|
16
|
+
'EmployeeFirstName',
|
17
|
+
'EmployeeFullName',
|
18
|
+
'EmployeeID',
|
19
|
+
'EmployeeLastName',
|
20
|
+
'EmployeeRecoveryDuration',
|
21
|
+
'EmployeeTypeID',
|
22
|
+
'EmployeeWasRequested',
|
23
|
+
'FinishStartDateTime',
|
24
|
+
'FinishTimeAppliedToEmployee',
|
25
|
+
'FinishTimeAppliedToRoom',
|
26
|
+
'FinishTimeDuration',
|
27
|
+
'FinishTimeOriginalDuration',
|
28
|
+
'ProcessingStartDateTime',
|
29
|
+
'ProcessingTimeAppliedToRoom',
|
30
|
+
'ProcessingTimeAppliedToEmployee',
|
31
|
+
'ProcessingTimeDuration',
|
32
|
+
'ProcessingTimeOriginalDuration',
|
33
|
+
'RequiresProcessingTime',
|
34
|
+
'Room',
|
35
|
+
'RoomID',
|
36
|
+
'RoomName',
|
37
|
+
'RoomRecoveryDuration',
|
38
|
+
'StartTimeDuration',
|
39
|
+
'StartTimeOriginalDuration',
|
40
|
+
'TagPrice',
|
41
|
+
'Treatment',
|
42
|
+
'TreatmentDuration',
|
43
|
+
'TreatmentID',
|
44
|
+
'TreatmentIsForCouples',
|
45
|
+
'TreatmentName',
|
46
|
+
'ClassInstanceID',
|
47
|
+
'IsDurationOverridden'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|