Skip to content

Commit 91626d3

Browse files
stripe-openapi[bot]prathmesh-stripehelenye-stripe
authored
Support for APIs in the new API version 2025-03-31.basil (#1543)
* Update generated code for v1559 * Update generated code for v1566 * Update generated code for v1572 * Update generated code for v1618 * Update generated code for v1635 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <[email protected]> Co-authored-by: helenye-stripe <[email protected]>
1 parent 80fb922 commit 91626d3

29 files changed

+290
-203
lines changed

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1505
1+
v1635

lib/stripe/api_version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
module Stripe
55
module ApiVersion
6-
CURRENT = "2025-02-24.acacia"
6+
CURRENT = "2025-03-31.basil"
77
end
88
end

lib/stripe/object_types.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def self.object_names_to_classes
7070
Invoice.object_name => Invoice,
7171
InvoiceItem.object_name => InvoiceItem,
7272
InvoiceLineItem.object_name => InvoiceLineItem,
73+
InvoicePayment.object_name => InvoicePayment,
7374
InvoiceRenderingTemplate.object_name => InvoiceRenderingTemplate,
7475
Issuing::Authorization.object_name => Issuing::Authorization,
7576
Issuing::Card.object_name => Issuing::Card,
@@ -140,8 +141,6 @@ def self.object_names_to_classes
140141
Treasury::ReceivedDebit.object_name => Treasury::ReceivedDebit,
141142
Treasury::Transaction.object_name => Treasury::Transaction,
142143
Treasury::TransactionEntry.object_name => Treasury::TransactionEntry,
143-
UsageRecord.object_name => UsageRecord,
144-
UsageRecordSummary.object_name => UsageRecordSummary,
145144
WebhookEndpoint.object_name => WebhookEndpoint,
146145
# object classes: The end of the section generated from our OpenAPI spec
147146
}

lib/stripe/resources.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
require "stripe/resources/invoice"
6060
require "stripe/resources/invoice_item"
6161
require "stripe/resources/invoice_line_item"
62+
require "stripe/resources/invoice_payment"
6263
require "stripe/resources/invoice_rendering_template"
6364
require "stripe/resources/issuing/authorization"
6465
require "stripe/resources/issuing/card"
@@ -129,8 +130,6 @@
129130
require "stripe/resources/treasury/received_debit"
130131
require "stripe/resources/treasury/transaction"
131132
require "stripe/resources/treasury/transaction_entry"
132-
require "stripe/resources/usage_record"
133-
require "stripe/resources/usage_record_summary"
134133
require "stripe/resources/v2/billing/meter_event"
135134
require "stripe/resources/v2/billing/meter_event_adjustment"
136135
require "stripe/resources/v2/billing/meter_event_session"

lib/stripe/resources/checkout/session.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def self.object_name
2727
"checkout.session"
2828
end
2929

30-
# Creates a Session object.
30+
# Creates a Checkout Session object.
3131
def self.create(params = {}, opts = {})
3232
request_stripe_object(
3333
method: :post,
@@ -37,9 +37,9 @@ def self.create(params = {}, opts = {})
3737
)
3838
end
3939

40-
# A Session can be expired when it is in one of these statuses: open
40+
# A Checkout Session can be expired when it is in one of these statuses: open
4141
#
42-
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
42+
# After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
4343
def expire(params = {}, opts = {})
4444
request_stripe_object(
4545
method: :post,
@@ -49,9 +49,9 @@ def expire(params = {}, opts = {})
4949
)
5050
end
5151

52-
# A Session can be expired when it is in one of these statuses: open
52+
# A Checkout Session can be expired when it is in one of these statuses: open
5353
#
54-
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
54+
# After it expires, a customer can't complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.
5555
def self.expire(session, params = {}, opts = {})
5656
request_stripe_object(
5757
method: :post,
@@ -91,7 +91,7 @@ def self.list_line_items(session, params = {}, opts = {})
9191
)
9292
end
9393

94-
# Updates a Session object.
94+
# Updates a Checkout Session object.
9595
def self.update(session, params = {}, opts = {})
9696
request_stripe_object(
9797
method: :post,

lib/stripe/resources/invoice.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,6 @@ def self.list(params = {}, opts = {})
135135
request_stripe_object(method: :get, path: "/v1/invoices", params: params, opts: opts)
136136
end
137137

138-
# When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
139-
def self.list_upcoming_line_items(params = {}, opts = {})
140-
request_stripe_object(
141-
method: :get,
142-
path: "/v1/invoices/upcoming/lines",
143-
params: params,
144-
opts: opts
145-
)
146-
end
147-
148138
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
149139
def mark_uncollectible(params = {}, opts = {})
150140
request_stripe_object(
@@ -237,17 +227,6 @@ def self.send_invoice(invoice, params = {}, opts = {})
237227
)
238228
end
239229

240-
# 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.
241-
#
242-
# 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.
243-
#
244-
# 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.
245-
#
246-
# 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)
247-
def self.upcoming(params = {}, opts = {})
248-
request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
249-
end
250-
251230
# Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
252231
# monetary values, as well as collection_method, become uneditable.
253232
#
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# File generated from our OpenAPI spec
2+
# frozen_string_literal: true
3+
4+
module Stripe
5+
# The invoice payment object
6+
class InvoicePayment < APIResource
7+
extend Stripe::APIOperations::List
8+
9+
OBJECT_NAME = "invoice_payment"
10+
def self.object_name
11+
"invoice_payment"
12+
end
13+
14+
# When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.
15+
def self.list(params = {}, opts = {})
16+
request_stripe_object(method: :get, path: "/v1/invoice_payments", params: params, opts: opts)
17+
end
18+
end
19+
end

lib/stripe/resources/payment_method_domain.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ def self.update(payment_method_domain, params = {}, opts = {})
4646
)
4747
end
4848

49-
# Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
50-
# The payment method doesn't appear in Elements for this domain until it is active.
49+
# Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
50+
# The payment method doesn't appear in Elements or Embedded Checkout for this domain until it is active.
5151
#
52-
# To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
52+
# To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint.
5353
#
5454
# Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
5555
def validate(params = {}, opts = {})
@@ -61,10 +61,10 @@ def validate(params = {}, opts = {})
6161
)
6262
end
6363

64-
# Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
65-
# The payment method doesn't appear in Elements for this domain until it is active.
64+
# Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain.
65+
# The payment method doesn't appear in Elements or Embedded Checkout for this domain until it is active.
6666
#
67-
# To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
67+
# To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint.
6868
#
6969
# Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
7070
def self.validate(payment_method_domain, params = {}, opts = {})

lib/stripe/resources/person.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module Stripe
55
# This is an object representing a person associated with a Stripe account.
66
#
7-
# 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.
7+
# A platform can only access a subset of data in 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.
88
#
99
# 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).
1010
class Person < APIResource

lib/stripe/resources/price.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def self.object_name
1919
"price"
2020
end
2121

22-
# Creates a new price for an existing product. The price can be recurring or one-time.
22+
# Creates a new [Price for an existing <a href="https://docs.stripe.com/api/products">Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time.
2323
def self.create(params = {}, opts = {})
2424
request_stripe_object(method: :post, path: "/v1/prices", params: params, opts: opts)
2525
end

0 commit comments

Comments
 (0)