Skip to content

Commit

Permalink
Update generated code for beta (#1222)
Browse files Browse the repository at this point in the history
* Update generated code for v352

* Update generated code for v353

* Downgrade jaro_winkler (#1225)

* Update generated code for v353 (#1223)

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com>

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] and pakrym-stripe authored May 25, 2023
1 parent 99dbffb commit 150be92
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
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

0 comments on commit 150be92

Please sign in to comment.