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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2de956c3f1649c9bfbee7b31f966400071895afbdf1815a488c8fa99d2f32d61
4
- data.tar.gz: 4184f2dd95b283d588ef1465d5ee18aa9b3ae393e90805badc196168218a8f09
3
+ metadata.gz: 8eab1cbc42e58b7936550c6881205c8869f75631b2e0f7f5e45bb7a06a721f7b
4
+ data.tar.gz: 72d8368d4e60895872bf2d7ebe8b4b45a887626cd0c01abbbb6817c469d7cfcf
5
5
  SHA512:
6
- metadata.gz: 5a71ff165dc07cddaccb615b8f55264d8091fa125336da21d1fba902e16d630f48cdb3f30f35873bb923d7c6b10fb673733b4c8f1d5a44e500eb6d92fb7cdd3e
7
- data.tar.gz: 3f48e1883d801d77badc577c785efb09a1b43e13b05b0fd94b8956de44d3ed9bb0d5448ff74fba1845372b390209d9d8aa0a44163377e0dacf784494724cc55d
6
+ metadata.gz: ae1672d2a6e704a401170f0b34022c441448cb092920ecce186f27eff0cf8dd04abe884cd4009fa93e421ada49a7f1f4697f0c41732920f92103bf5e2698710d
7
+ data.tar.gz: 9f0e4efd6c65482a762d18e7fe1adc3215456f965bf7fca80b503834a54a37d3aa658d81966bbd0ad8dbb54af2198ec94883ff2fa8d5b97e2c6e3d0b7052a25b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- supersaas-api-client (0.9.0)
4
+ supersaas-api-client (0.10.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
 
@@ -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', 'address': 'addr'}
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
- client.delete(path)
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)
@@ -1,4 +1,4 @@
1
1
  module Supersaas
2
2
  API_VERSION = '1'
3
- VERSION = '0.9.0'
3
+ VERSION = '0.10.0'
4
4
  end
@@ -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.9.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-03-20 00:00:00.000000000 Z
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/schedules_test.rb
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