diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6275e8074..f780889d1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v351 \ No newline at end of file +v358 \ No newline at end of file diff --git a/lib/stripe/api_version.rb b/lib/stripe/api_version.rb index df2894861..662e2d214 100644 --- a/lib/stripe/api_version.rb +++ b/lib/stripe/api_version.rb @@ -4,6 +4,6 @@ module Stripe module ApiVersion CURRENT = "2022-11-15" - PREVIEW = "2023-05-16.preview-v2" + PREVIEW = "20230519T204128" end end diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index ebdc74b55..c8ca474b9 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -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 diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index 0af31f334..2c6032ef2 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -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 diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index 2413cc162..da20abfa4 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -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")