diff --git a/lib/stripe/terminal/location.rb b/lib/stripe/terminal/location.rb index 322b41f4a..294f83c9b 100644 --- a/lib/stripe/terminal/location.rb +++ b/lib/stripe/terminal/location.rb @@ -4,6 +4,7 @@ module Stripe module Terminal class Location < Stripe::APIResource extend Stripe::APIOperations::Create + include Stripe::APIOperations::Delete extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/lib/stripe/terminal/reader.rb b/lib/stripe/terminal/reader.rb index 78d9d7039..fe1ee6c24 100644 --- a/lib/stripe/terminal/reader.rb +++ b/lib/stripe/terminal/reader.rb @@ -4,6 +4,7 @@ module Stripe module Terminal class Reader < Stripe::APIResource extend Stripe::APIOperations::Create + include Stripe::APIOperations::Delete extend Stripe::APIOperations::List include Stripe::APIOperations::Save diff --git a/test/stripe/terminal/location_test.rb b/test/stripe/terminal/location_test.rb index 552136dfa..19396c93f 100644 --- a/test/stripe/terminal/location_test.rb +++ b/test/stripe/terminal/location_test.rb @@ -46,6 +46,13 @@ class LocationTest < Test::Unit::TestCase assert_requested :post, "#{Stripe.api_base}/v1/terminal/locations/loc_123" assert location.is_a?(Stripe::Terminal::Location) end + + should "be deletable" do + location = Stripe::Terminal::Location.retrieve("loc_123") + location = location.delete + assert_requested :delete, "#{Stripe.api_base}/v1/terminal/locations/#{location.id}" + assert location.is_a?(Stripe::Terminal::Location) + end end end end diff --git a/test/stripe/terminal/reader_test.rb b/test/stripe/terminal/reader_test.rb index 4e967fe1f..6ad254094 100644 --- a/test/stripe/terminal/reader_test.rb +++ b/test/stripe/terminal/reader_test.rb @@ -40,6 +40,13 @@ class ReaderTest < Test::Unit::TestCase assert_requested :post, "#{Stripe.api_base}/v1/terminal/readers/rdr_123" assert reader.is_a?(Stripe::Terminal::Reader) end + + should "be deletable" do + reader = Stripe::Terminal::Reader.retrieve("rdr_123") + reader = reader.delete + assert_requested :delete, "#{Stripe.api_base}/v1/terminal/readers/#{reader.id}" + assert reader.is_a?(Stripe::Terminal::Reader) + end end end end