API Updates (#981)

This commit is contained in:
Richard Marmorstein 2021-06-04 12:35:25 -04:00 committed by GitHub
parent 83b0cb369e
commit faf84198c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 2 deletions

View File

@ -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:

View File

@ -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,

View File

@ -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"

View 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

View 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

View File

@ -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