Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #981

Merged
merged 3 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ notifications:
env:
global:
# 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:
directories:
Expand Down
1 change: 1 addition & 0 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def self.object_names_to_classes
Subscription::OBJECT_NAME => Subscription,
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
TaxCode::OBJECT_NAME => TaxCode,
TaxId::OBJECT_NAME => TaxId,
TaxRate::OBJECT_NAME => TaxRate,
Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
Expand Down
1 change: 1 addition & 0 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
require "stripe/resources/subscription"
require "stripe/resources/subscription_item"
require "stripe/resources/subscription_schedule"
require "stripe/resources/tax_code"
require "stripe/resources/tax_id"
require "stripe/resources/tax_rate"
require "stripe/resources/terminal/connection_token"
Expand Down
10 changes: 10 additions & 0 deletions lib/stripe/resources/tax_code.rb
Original file line number Diff line number Diff line change
@@ -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 changes: 20 additions & 0 deletions test/stripe/tax_code_test.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
require ::File.expand_path("stripe_mock", __dir__)

# 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

# Disable all real network connections except those that are outgoing to
Expand Down