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

Update generated code for beta #1222

Merged
merged 7 commits into from
May 25, 2023
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 OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v351
v358
2 changes: 1 addition & 1 deletion lib/stripe/api_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
module Stripe
module ApiVersion
CURRENT = "2022-11-15"
PREVIEW = "2023-05-16.preview-v2"
PREVIEW = "20230519T204128"
end
end
9 changes: 4 additions & 5 deletions lib/stripe/resources/charge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
# frozen_string_literal: true

module Stripe
# To charge a credit or a debit card, you create a `Charge` object. You can
# retrieve and refund individual charges as well as list all charges. Charges
# are identified by a unique, random ID.
#
# Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges)
# The `Charge` object represents a single attempt to move money into your Stripe account.
# PaymentIntent confirmation is the most common way to create Charges, but transferring
# money to a different Stripe account through Connect also creates Charges.
# Some legacy payment flows create Charges directly, which is not recommended for new integrations.
class Charge < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
Expand Down
2 changes: 0 additions & 2 deletions lib/stripe/resources/token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ module Stripe
# objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that
# [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
# performs best with integrations that use client-side tokenization.
#
# Related guide: [Accept a payment with Charges and Tokens](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)
class Token < APIResource
extend Stripe::APIOperations::Create

Expand Down
24 changes: 24 additions & 0 deletions test/stripe/generated_examples_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,30 @@ class CodegennedExampleTest < Test::Unit::TestCase
assert_requested :post, "#{Stripe.api_base}/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"
end
end
context "Tax.Calculation.create" do
should "support requests with args: currency, line_items, customer_details" do
Stripe::Tax::Calculation.create({
currency: "usd",
line_items: [
{
amount: 1000,
reference: "L1",
},
],
customer_details: {
address: {
line1: "354 Oyster Point Blvd",
city: "South San Francisco",
state: "CA",
postal_code: "94080",
country: "US",
},
address_source: "shipping",
},
})
assert_requested :post, "#{Stripe.api_base}/v1/tax/calculations"
end
end
context "Tax.Calculation.list_line_items" do
should "support requests with args: calculation" do
Stripe::Tax::Calculation.list_line_items("xxx")
Expand Down