mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-04 00:00:47 -04:00
Add support for Terminal Location and Reader deletion
This commit is contained in:
parent
df8c141bb8
commit
031075c954
@ -17,7 +17,7 @@ sudo: false
|
||||
env:
|
||||
global:
|
||||
# If changing this number, please also change it in `test/test_helper.rb`.
|
||||
- STRIPE_MOCK_VERSION=0.47.0
|
||||
- STRIPE_MOCK_VERSION=0.49.0
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -46,6 +46,13 @@ module Stripe
|
||||
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
|
||||
|
@ -40,6 +40,13 @@ module Stripe
|
||||
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
|
||||
|
@ -17,7 +17,7 @@ require ::File.expand_path("../test_data", __FILE__)
|
||||
require ::File.expand_path("../stripe_mock", __FILE__)
|
||||
|
||||
# If changing this number, please also change it in `.travis.yml`.
|
||||
MOCK_MINIMUM_VERSION = "0.47.0".freeze
|
||||
MOCK_MINIMUM_VERSION = "0.49.0".freeze
|
||||
MOCK_PORT = Stripe::StripeMock.start
|
||||
|
||||
# Disable all real network connections except those that are outgoing to
|
||||
|
Loading…
x
Reference in New Issue
Block a user