mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-03 00:01:21 -04:00
API Updates (#981)
This commit is contained in:
parent
83b0cb369e
commit
faf84198c6
@ -15,7 +15,7 @@ notifications:
|
|||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# If changing this number, please also change it in `test/test_helper.rb`.
|
# If changing this number, please also change it in `test/test_helper.rb`.
|
||||||
- STRIPE_MOCK_VERSION=0.105.0
|
- STRIPE_MOCK_VERSION=0.106.0
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
@ -84,6 +84,7 @@ module Stripe
|
|||||||
Subscription::OBJECT_NAME => Subscription,
|
Subscription::OBJECT_NAME => Subscription,
|
||||||
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
|
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
|
||||||
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
||||||
|
TaxCode::OBJECT_NAME => TaxCode,
|
||||||
TaxId::OBJECT_NAME => TaxId,
|
TaxId::OBJECT_NAME => TaxId,
|
||||||
TaxRate::OBJECT_NAME => TaxRate,
|
TaxRate::OBJECT_NAME => TaxRate,
|
||||||
Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
|
Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
|
||||||
|
@ -73,6 +73,7 @@ require "stripe/resources/source_transaction"
|
|||||||
require "stripe/resources/subscription"
|
require "stripe/resources/subscription"
|
||||||
require "stripe/resources/subscription_item"
|
require "stripe/resources/subscription_item"
|
||||||
require "stripe/resources/subscription_schedule"
|
require "stripe/resources/subscription_schedule"
|
||||||
|
require "stripe/resources/tax_code"
|
||||||
require "stripe/resources/tax_id"
|
require "stripe/resources/tax_id"
|
||||||
require "stripe/resources/tax_rate"
|
require "stripe/resources/tax_rate"
|
||||||
require "stripe/resources/terminal/connection_token"
|
require "stripe/resources/terminal/connection_token"
|
||||||
|
10
lib/stripe/resources/tax_code.rb
Normal file
10
lib/stripe/resources/tax_code.rb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
class TaxCode < APIResource
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
|
OBJECT_NAME = "tax_code"
|
||||||
|
end
|
||||||
|
end
|
20
test/stripe/tax_code_test.rb
Normal file
20
test/stripe/tax_code_test.rb
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require ::File.expand_path("../test_helper", __dir__)
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
class TaxCodeTest < Test::Unit::TestCase
|
||||||
|
should "be listable" do
|
||||||
|
tax_codes = Stripe::TaxCode.list
|
||||||
|
assert_requested :get, "#{Stripe.api_base}/v1/tax_codes"
|
||||||
|
assert tax_codes.data.is_a?(Array)
|
||||||
|
assert tax_codes.first.is_a?(Stripe::TaxCode)
|
||||||
|
end
|
||||||
|
|
||||||
|
should "be retrievable" do
|
||||||
|
tax_code = Stripe::TaxCode.retrieve("txcd_123")
|
||||||
|
assert_requested :get, "#{Stripe.api_base}/v1/tax_codes/txcd_123"
|
||||||
|
assert tax_code.is_a?(Stripe::TaxCode)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -13,7 +13,7 @@ require ::File.expand_path("test_data", __dir__)
|
|||||||
require ::File.expand_path("stripe_mock", __dir__)
|
require ::File.expand_path("stripe_mock", __dir__)
|
||||||
|
|
||||||
# If changing this number, please also change it in `.travis.yml`.
|
# If changing this number, please also change it in `.travis.yml`.
|
||||||
MOCK_MINIMUM_VERSION = "0.105.0"
|
MOCK_MINIMUM_VERSION = "0.106.0"
|
||||||
MOCK_PORT = Stripe::StripeMock.start
|
MOCK_PORT = Stripe::StripeMock.start
|
||||||
|
|
||||||
# Disable all real network connections except those that are outgoing to
|
# Disable all real network connections except those that are outgoing to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user