supersaas-api-client 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/examples/appointments.rb +3 -3
- data/lib/supersaas-api-client/api/appointments.rb +3 -2
- data/lib/supersaas-api-client/version.rb +1 -1
- data/test/appointments_test.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8eab1cbc42e58b7936550c6881205c8869f75631b2e0f7f5e45bb7a06a721f7b
|
4
|
+
data.tar.gz: 72d8368d4e60895872bf2d7ebe8b4b45a887626cd0c01abbbb6817c469d7cfcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae1672d2a6e704a401170f0b34022c441448cb092920ecce186f27eff0cf8dd04abe884cd4009fa93e421ada49a7f1f4697f0c41732920f92103bf5e2698710d
|
7
|
+
data.tar.gz: 9f0e4efd6c65482a762d18e7fe1adc3215456f965bf7fca80b503834a54a37d3aa658d81966bbd0ad8dbb54af2198ec94883ff2fa8d5b97e2c6e3d0b7052a25b
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -125,9 +125,9 @@ Update an appointment by `schedule_id` and `appointment_id` with appointment att
|
|
125
125
|
|
126
126
|
#### Delete Appointment/Booking
|
127
127
|
|
128
|
-
Delete a single appointment by `appointment_id`:
|
128
|
+
Delete a single appointment by `schedule_id` and `appointment_id`:
|
129
129
|
|
130
|
-
Supersaas::Client.instance.appointments.delete(12345) #=> nil
|
130
|
+
Supersaas::Client.instance.appointments.delete(12345, 67890) #=> nil
|
131
131
|
|
132
132
|
#### Get Appointment/Booking
|
133
133
|
|
data/examples/appointments.rb
CHANGED
@@ -31,7 +31,7 @@ new_appointment_id = nil
|
|
31
31
|
user = ENV['SSS_API_USER']
|
32
32
|
if user
|
33
33
|
description = '1234567890.'
|
34
|
-
params = {full_name: 'Example', description: description, name: 'example@example.com', email: 'example@example.com', mobile: '555-5555', phone: '555-5555',
|
34
|
+
params = {full_name: 'Example', description: description, name: 'example@example.com', email: 'example@example.com', mobile: '555-5555', phone: '555-5555', address: 'addr'}
|
35
35
|
if show_slot
|
36
36
|
params[:slot_id] = ENV['SSS_API_SLOT']
|
37
37
|
else
|
@@ -58,8 +58,8 @@ appointments.each do |appointment|
|
|
58
58
|
Supersaas::Client.instance.appointments.update(schedule_id, new_appointment_id, {country: 'FR', address: 'Rue 1'})
|
59
59
|
|
60
60
|
puts "\n\rdeleting appointment..."
|
61
|
-
puts "\n\r#### Supersaas::Client.instance.appointments.delete(#{new_appointment_id})\n\r"
|
62
|
-
Supersaas::Client.instance.appointments.delete(new_appointment_id)
|
61
|
+
puts "\n\r#### Supersaas::Client.instance.appointments.delete(#{schedule_id}. #{new_appointment_id})\n\r"
|
62
|
+
Supersaas::Client.instance.appointments.delete(schedule_id, new_appointment_id)
|
63
63
|
break
|
64
64
|
end
|
65
65
|
end
|
@@ -111,9 +111,10 @@ module Supersaas
|
|
111
111
|
client.put(path, params)
|
112
112
|
end
|
113
113
|
|
114
|
-
def delete(appointment_id)
|
114
|
+
def delete(schedule_id, appointment_id)
|
115
115
|
path = "/bookings/#{validate_id(appointment_id)}"
|
116
|
-
|
116
|
+
params = {schedule_id: validate_id(schedule_id)}
|
117
|
+
client.delete(path, nil, params)
|
117
118
|
end
|
118
119
|
|
119
120
|
def changes(schedule_id, from_time)
|
data/test/appointments_test.rb
CHANGED
@@ -72,8 +72,8 @@ module Supersaas
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def test_delete
|
75
|
-
refute_nil @client.appointments.delete(@appointment_id)
|
76
|
-
assert_last_request_path "/api/bookings/#{@appointment_id}.json"
|
75
|
+
refute_nil @client.appointments.delete(@schedule_id, @appointment_id)
|
76
|
+
assert_last_request_path "/api/bookings/#{@appointment_id}.json?schedule_id=#{@schedule_id}"
|
77
77
|
end
|
78
78
|
|
79
79
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: supersaas-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,9 +123,9 @@ signing_key:
|
|
123
123
|
specification_version: 4
|
124
124
|
summary: Online bookings/appointments/calendars using the SuperSaaS scheduling platform.
|
125
125
|
test_files:
|
126
|
-
- test/appointments_test.rb
|
127
|
-
- test/client_test.rb
|
128
126
|
- test/forms_test.rb
|
129
|
-
- test/
|
127
|
+
- test/client_test.rb
|
130
128
|
- test/test_helper.rb
|
131
129
|
- test/users_test.rb
|
130
|
+
- test/schedules_test.rb
|
131
|
+
- test/appointments_test.rb
|