From ad22bab02f1f188150199d5a62ad9a76d81b4e1d Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 14:12:53 -0700 Subject: [PATCH 01/10] Update generated code for v969 (#1385) Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/stripe/resources/invoice.rb | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ea2fb0ba1..6031d9a63 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v961 \ No newline at end of file +v969 \ No newline at end of file diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 2d51f0cf1..066a4b642 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -51,6 +51,20 @@ def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts) end + # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + # + # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. + # + # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. + def self.create_preview(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: "/v1/invoices/create_preview", + params: params, + opts: opts + ) + end + # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice). def self.delete(id, params = {}, opts = {}) request_stripe_object( From 47db6b0adffa61b87e4472e36ca89996936e052c Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 18 Apr 2024 14:24:25 -0700 Subject: [PATCH 02/10] Bump version to 11.2.0 --- CHANGELOG.md | 4 ++++ VERSION | 2 +- lib/stripe/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a5c1db7d..1d27419a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## 11.2.0 - 2024-04-18 +* [#1385](https://github.com/stripe/stripe-ruby/pull/1385) Update generated code + * Add support for `create_preview` method on resource `Invoice` + ## 11.1.0 - 2024-04-16 * [#1379](https://github.com/stripe/stripe-ruby/pull/1379) Update generated code * Add support for new resource `Entitlements.ActiveEntitlementSummary` diff --git a/VERSION b/VERSION index 68d8f15e2..b85c6c7b0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.1.0 +11.2.0 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index ea1b68228..ed03e601d 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "11.1.0" + VERSION = "11.2.0" end From fa02db50abf59d545e3b8da4be78678bb026b527 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 22:18:23 +0000 Subject: [PATCH 03/10] Update generated code for v979 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/account.rb | 43 ++++++++++++++++++---------- lib/stripe/resources/bank_account.rb | 7 +++-- lib/stripe/resources/login_link.rb | 2 +- lib/stripe/resources/person.rb | 5 ++-- lib/stripe/resources/token.rb | 4 +-- 6 files changed, 38 insertions(+), 25 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e0b273508..ee1839570 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v972 \ No newline at end of file +v979 \ No newline at end of file diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index 5968b8e3e..8d20fe6c1 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -6,9 +6,14 @@ module Stripe # properties on the account like its current requirements or if the account is # enabled to make live charges or receive payouts. # - # For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that - # account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), - # some properties are only returned for Custom accounts. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts). + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is `application`, which includes Custom accounts, the properties below are always + # returned. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is `stripe`, which includes Standard and Express accounts, some properties are only returned + # until you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions) + # to start Connect Onboarding. Learn about the [differences between accounts](https://stripe.com/connect/accounts). class Account < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete @@ -39,9 +44,11 @@ def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/accounts", params: params, opts: opts) end - # With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage. + # With [Connect](https://stripe.com/connect), you can delete accounts you manage. + # + # Test-mode accounts can be deleted at any time. # - # Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. + # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. # # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. def self.delete(id, params = {}, opts = {}) @@ -53,9 +60,11 @@ def self.delete(id, params = {}, opts = {}) ) end - # With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage. + # With [Connect](https://stripe.com/connect), you can delete accounts you manage. # - # Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. + # Test-mode accounts can be deleted at any time. + # + # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. # # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. def delete(params = {}, opts = {}) @@ -92,9 +101,9 @@ def self.persons(account, params = {}, opts = {}) ) end - # With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious. + # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious. # - # Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero. + # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. def reject(params = {}, opts = {}) request_stripe_object( method: :post, @@ -104,9 +113,9 @@ def reject(params = {}, opts = {}) ) end - # With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious. + # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious. # - # Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero. + # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. def self.reject(account, params = {}, opts = {}) request_stripe_object( method: :post, @@ -116,12 +125,16 @@ def self.reject(account, params = {}, opts = {}) ) end - # Updates a [connected account](https://stripe.com/docs/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are + # Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are # left unchanged. # - # For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that - # account has started to go through Connect Onboarding. Once you create an [Account Link or Account Session](https://stripe.com/docs/api/account_links), - # some properties can only be changed or updated for Custom accounts. + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is application, which includes Custom accounts, you can update any information on the account. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is stripe, which includes Standard and Express accounts, you can update all information until you create + # an [Account Link or Account Session](https://stripe.com/api/account_links) to start Connect onboarding, + # after which some properties can no longer be updated. # # To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our # [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts. diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index df0200a43..656ef7112 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -4,11 +4,12 @@ module Stripe # These bank accounts are payment methods on `Customer` objects. # - # On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer - # destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). + # On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer + # destinations on `Account` objects for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is `application`, which includes [Custom accounts](https://stripe.com/connect/custom-accounts). # They can be bank accounts or debit cards as well, and are documented in the links above. # - # Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers) + # Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers) class BankAccount < APIResource include Stripe::APIOperations::Delete extend Stripe::APIOperations::List diff --git a/lib/stripe/resources/login_link.rb b/lib/stripe/resources/login_link.rb index d76df2d02..813225126 100644 --- a/lib/stripe/resources/login_link.rb +++ b/lib/stripe/resources/login_link.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true module Stripe - # Login Links are single-use login link for an Express account to access their Stripe dashboard. + # Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard. class LoginLink < APIResource OBJECT_NAME = "login_link" def self.object_name diff --git a/lib/stripe/resources/person.rb b/lib/stripe/resources/person.rb index 69454b8d9..1262a5ad9 100644 --- a/lib/stripe/resources/person.rb +++ b/lib/stripe/resources/person.rb @@ -4,10 +4,9 @@ module Stripe # This is an object representing a person associated with a Stripe account. # - # A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. - # See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps. + # A platform cannot access a person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. # - # Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information) + # See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#person-information). class Person < APIResource include Stripe::APIOperations::Save diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index 565c5d900..9ae3b7f63 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -19,7 +19,7 @@ module Stripe # # You can't store or use tokens more than once. To store card or bank account # information for later use, create [Customer](https://stripe.com/docs/api#customers) - # objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). + # objects or [External accounts](https://stripe.com/api#external_accounts). # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, # performs best with integrations that use client-side tokenization. class Token < APIResource @@ -31,7 +31,7 @@ def self.object_name end # Creates a single-use token that represents a bank account's details. - # You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts). + # You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/tokens", params: params, opts: opts) end From c83c27da749725e4699ac94eb97ab10a9bf55aa6 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:03:40 +0000 Subject: [PATCH 04/10] Update generated code for v985 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/event.rb | 6 +++--- lib/stripe/resources/webhook_endpoint.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ee1839570..8a5a8933c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v979 \ No newline at end of file +v985 \ No newline at end of file diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb index bc22180e9..d2628ef5a 100644 --- a/lib/stripe/resources/event.rb +++ b/lib/stripe/resources/event.rb @@ -23,10 +23,10 @@ module Stripe # `Event` objects directly to an endpoint on your server. You can manage # webhooks in your # [account settings](https://dashboard.stripe.com/account/webhooks). Learn how - # to [listen for events](https://stripe.com/docs/webhooks) + # to [listen for events](https://docs.stripe.com/webhooks) # so that your integration can automatically trigger reactions. # - # When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications + # When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications # that occur in connected accounts. For these events, there's an # additional `account` attribute in the received `Event` object. # @@ -40,7 +40,7 @@ def self.object_name "event" end - # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). + # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). def self.list(filters = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/events", params: filters, opts: opts) end diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb index 0bf802d7e..9f9ca1925 100644 --- a/lib/stripe/resources/webhook_endpoint.rb +++ b/lib/stripe/resources/webhook_endpoint.rb @@ -2,13 +2,13 @@ # frozen_string_literal: true module Stripe - # You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be + # You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be # notified about events that happen in your Stripe account or connected # accounts. # # Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. # - # Related guide: [Setting up webhooks](https://stripe.com/docs/webhooks/configure) + # Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) class WebhookEndpoint < APIResource extend Stripe::APIOperations::Create include Stripe::APIOperations::Delete From d8701e8749d357a1dde0d8ebc0d1ca42a1f0b82d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 22:00:29 +0000 Subject: [PATCH 05/10] Update generated code for v989 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/invoice.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8a5a8933c..811766d23 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v985 \ No newline at end of file +v989 \ No newline at end of file diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 6d631b897..2d3375aa1 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -275,7 +275,7 @@ def self.send_invoice(invoice, params = {}, opts = {}) # # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. # - # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date value passed in the request. + # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. def self.upcoming(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts) end From a802c007b268fdfa0add3e1f61bf58936bcfcb7d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:57:43 +0000 Subject: [PATCH 06/10] Update generated code for v997 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/payment_method_configuration.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 811766d23..bb0c37c10 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v989 \ No newline at end of file +v997 \ No newline at end of file diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb index 441e4c4c4..e65da54d2 100644 --- a/lib/stripe/resources/payment_method_configuration.rb +++ b/lib/stripe/resources/payment_method_configuration.rb @@ -12,6 +12,8 @@ module Stripe # # Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. # + # **Note:** The ability to turn off cards is in limited preview. Please [contact us](https://support.stripe.com/contact) if you require this functionality. + # # Related guides: # - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) # - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs) From ee9ea1595a800cbf027251402f6f1fc1c8e3206a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:44:18 +0000 Subject: [PATCH 07/10] Update generated code for v1002 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/issuing/authorization.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bb0c37c10..915b26594 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v997 \ No newline at end of file +v1002 \ No newline at end of file diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index decc5e3b7..c5eeae69b 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -9,6 +9,7 @@ module Issuing # # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) class Authorization < APIResource + extend Gem::Deprecate extend Stripe::APIOperations::List include Stripe::APIOperations::Save @@ -27,6 +28,7 @@ def approve(params = {}, opts = {}) opts: opts ) end + deprecate :approve, :none, 2024, 3 # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). @@ -38,6 +40,10 @@ def self.approve(authorization, params = {}, opts = {}) opts: opts ) end + class << self + extend Gem::Deprecate + deprecate :approve, :none, 2024, 3 + end # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). @@ -49,6 +55,7 @@ def decline(params = {}, opts = {}) opts: opts ) end + deprecate :decline, :none, 2024, 3 # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). @@ -60,6 +67,10 @@ def self.decline(authorization, params = {}, opts = {}) opts: opts ) end + class << self + extend Gem::Deprecate + deprecate :decline, :none, 2024, 3 + end # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. def self.list(filters = {}, opts = {}) From b7d691bafd18f5f2c70538358cc3927289a6d901 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:48:46 +0000 Subject: [PATCH 08/10] Update generated code for v1003 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/invoice.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 915b26594..754ed6e23 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1002 \ No newline at end of file +v1003 \ No newline at end of file diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 2d3375aa1..f08a7299c 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -115,6 +115,8 @@ def self.create(params = {}, opts = {}) # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. # # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. + # + # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) def self.create_preview(params = {}, opts = {}) request_stripe_object( method: :post, @@ -276,6 +278,8 @@ def self.send_invoice(invoice, params = {}, opts = {}) # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. # # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. + # + # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) def self.upcoming(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts) end From 1177f60eceb634d49346fb4feb3938f83d9e0477 Mon Sep 17 00:00:00 2001 From: Blake Williams Date: Wed, 1 May 2024 10:04:53 +1000 Subject: [PATCH 09/10] Add Ruby 3.3 to CI test matrix (#1391) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b3268e42..8c2571731 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, jruby-9.4.0.0, truffleruby-head] + ruby-version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, '3.3', jruby-9.4.0.0, truffleruby-head] steps: - uses: actions/checkout@v3 - name: Set up Ruby From 1fadafb39ca6754fbe5f98ee03e28cf9c17ea480 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 19:16:03 +0000 Subject: [PATCH 10/10] Update generated code for v1005 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/payment_method_configuration.rb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 51b250e65..dc5a50d6b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1004 \ No newline at end of file +v1005 \ No newline at end of file diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb index e65da54d2..441e4c4c4 100644 --- a/lib/stripe/resources/payment_method_configuration.rb +++ b/lib/stripe/resources/payment_method_configuration.rb @@ -12,8 +12,6 @@ module Stripe # # Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API. # - # **Note:** The ability to turn off cards is in limited preview. Please [contact us](https://support.stripe.com/contact) if you require this functionality. - # # Related guides: # - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations) # - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)