examples/appointments.rb in supersaas-api-client-0.9.0 vs examples/appointments.rb in supersaas-api-client-0.10.0

- old
+ new

@@ -29,11 +29,11 @@ description = nil new_appointment_id = nil user = ENV['SSS_API_USER'] if user description = '1234567890.' - params = {full_name: 'Example', description: description, name: 'example@example.com', email: 'example@example.com', mobile: '555-5555', phone: '555-5555', 'address': 'addr'} + params = {full_name: 'Example', description: description, name: 'example@example.com', email: 'example@example.com', mobile: '555-5555', phone: '555-5555', address: 'addr'} if show_slot params[:slot_id] = ENV['SSS_API_SLOT'] else days = 1 + rand(30) params[:start] = Time.now + (days * 24 * 60 * 60) @@ -56,11 +56,11 @@ puts "\n\rupdating appointment..." puts "\n\r#### Supersaas::Client.instance.appointments.update(#{schedule_id}, #{new_appointment_id}, {...})\n\r" Supersaas::Client.instance.appointments.update(schedule_id, new_appointment_id, {country: 'FR', address: 'Rue 1'}) puts "\n\rdeleting appointment..." - puts "\n\r#### Supersaas::Client.instance.appointments.delete(#{new_appointment_id})\n\r" - Supersaas::Client.instance.appointments.delete(new_appointment_id) + puts "\n\r#### Supersaas::Client.instance.appointments.delete(#{schedule_id}. #{new_appointment_id})\n\r" + Supersaas::Client.instance.appointments.delete(schedule_id, new_appointment_id) break end end if appointments.size > 0 \ No newline at end of file