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 #1527

Open
wants to merge 12 commits into
base: beta
Choose a base branch
from
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# Changelog

## 13.4.1 - 2025-01-28
* [#1528](https://github.com/stripe/stripe-ruby/pull/1528) Update generated code
* ⚠️ Bugfix: `invoice` and `line_item_id` can be passed to `update` method in `InvoiceLineItem`.

## 13.4.0 - 2025-01-27
* [#1510](https://github.com/stripe/stripe-ruby/pull/1510) Update generated code
* Add support for `close` method on resource `Treasury.FinancialAccount`
* [#1521](https://github.com/stripe/stripe-ruby/pull/1521) pipe rubocop output to devnull
* [#1519](https://github.com/stripe/stripe-ruby/pull/1519) Fixed typos in CONTRIBUTING.MD
* [#1513](https://github.com/stripe/stripe-ruby/pull/1513) add justfile
* [#1515](https://github.com/stripe/stripe-ruby/pull/1515) Added CONTRIBUTING.md file

## 13.4.0-beta.4 - 2025-01-23
* [#1523](https://github.com/stripe/stripe-ruby/pull/1523) Update generated code for beta
* Removed support for `stripe_account` from `Stripe::Terminal::Reader`. Use `account` instead.
* Removed support for `stripe_account` from `Stripe::Terminal::Reader`. Use `account` instead.

## 13.4.0-beta.3 - 2025-01-17
* [#1514](https://github.com/stripe/stripe-ruby/pull/1514) Update generated code for beta


## 13.4.0-beta.2 - 2025-01-09
* [#1504](https://github.com/stripe/stripe-ruby/pull/1504) Update generated code for beta
* Add support for `close` method on resource `Treasury.FinancialAccount`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1460
v1467
8 changes: 4 additions & 4 deletions lib/stripe/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5214,10 +5214,10 @@ def self.create(params = {}, opts = {})
# 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/balance_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 = {})
def self.delete(account, params = {}, opts = {})
request_stripe_object(
method: :delete,
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/accounts/%<account>s", { account: CGI.escape(account) }),
params: params,
opts: opts
)
Expand Down Expand Up @@ -5301,10 +5301,10 @@ def self.reject(account, params = {}, opts = {})
#
# 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.
def self.update(id, params = {}, opts = {})
def self.update(account, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/accounts/%<account>s", { account: CGI.escape(account) }),
params: params,
opts: opts
)
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/account_notice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ def self.list(params = {}, opts = {})
end

# Updates an AccountNotice object.
def self.update(id, params = {}, opts = {})
def self.update(account_notice, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/account_notices/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/account_notices/%<account_notice>s", { account_notice: CGI.escape(account_notice) }),
params: params,
opts: opts
)
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/apple_pay_domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def self.create(params = {}, opts = {})
end

# Delete an apple pay domain.
def self.delete(id, params = {}, opts = {})
def self.delete(domain, params = {}, opts = {})
request_stripe_object(
method: :delete,
path: format("/v1/apple_pay/domains/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/apple_pay/domains/%<domain>s", { domain: CGI.escape(domain) }),
params: params,
opts: opts
)
Expand Down
36 changes: 18 additions & 18 deletions lib/stripe/resources/balance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def self.object_name

class Available < Stripe::StripeObject
class SourceTypes < Stripe::StripeObject
# Amount for bank account.
# Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
attr_reader :bank_account
# Amount for card.
# Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
attr_reader :card
# Amount for FPX.
# Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
attr_reader :fpx
end
# Balance amount.
Expand All @@ -38,11 +38,11 @@ class SourceTypes < Stripe::StripeObject

class ConnectReserved < Stripe::StripeObject
class SourceTypes < Stripe::StripeObject
# Amount for bank account.
# Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
attr_reader :bank_account
# Amount for card.
# Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
attr_reader :card
# Amount for FPX.
# Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
attr_reader :fpx
end
# Balance amount.
Expand All @@ -56,11 +56,11 @@ class SourceTypes < Stripe::StripeObject
class InstantAvailable < Stripe::StripeObject
class NetAvailable < Stripe::StripeObject
class SourceTypes < Stripe::StripeObject
# Amount for bank account.
# Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
attr_reader :bank_account
# Amount for card.
# Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
attr_reader :card
# Amount for FPX.
# Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
attr_reader :fpx
end
# Net balance amount, subtracting fees from platform-set pricing.
Expand All @@ -72,11 +72,11 @@ class SourceTypes < Stripe::StripeObject
end

class SourceTypes < Stripe::StripeObject
# Amount for bank account.
# Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
attr_reader :bank_account
# Amount for card.
# Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
attr_reader :card
# Amount for FPX.
# Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
attr_reader :fpx
end
# Balance amount.
Expand All @@ -92,11 +92,11 @@ class SourceTypes < Stripe::StripeObject
class Issuing < Stripe::StripeObject
class Available < Stripe::StripeObject
class SourceTypes < Stripe::StripeObject
# Amount for bank account.
# Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
attr_reader :bank_account
# Amount for card.
# Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
attr_reader :card
# Amount for FPX.
# Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
attr_reader :fpx
end
# Balance amount.
Expand All @@ -112,11 +112,11 @@ class SourceTypes < Stripe::StripeObject

class Pending < Stripe::StripeObject
class SourceTypes < Stripe::StripeObject
# Amount for bank account.
# Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
attr_reader :bank_account
# Amount for card.
# Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
attr_reader :card
# Amount for FPX.
# Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
attr_reader :fpx
end
# Balance amount.
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/resources/billing/meter_event_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module Stripe
module Billing
# A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much
# usage was accrued by a customer for that period.
#
# Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.
class MeterEventSummary < APIResource
OBJECT_NAME = "billing.meter_event_summary"
def self.object_name
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/billing_portal/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,10 @@ def self.list(params = {}, opts = {})
end

# Updates a configuration that describes the functionality of the customer portal.
def self.update(id, params = {}, opts = {})
def self.update(configuration, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/billing_portal/configurations/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/billing_portal/configurations/%<configuration>s", { configuration: CGI.escape(configuration) }),
params: params,
opts: opts
)
Expand Down
8 changes: 6 additions & 2 deletions lib/stripe/resources/charge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ class Funding < Stripe::StripeObject
class Card < Stripe::StripeObject
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
attr_reader :brand
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
attr_reader :brand_product
# Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
attr_reader :country
# Two-digit number representing the card's expiration month.
Expand Down Expand Up @@ -939,6 +941,8 @@ class Funding < Stripe::StripeObject
class Card < Stripe::StripeObject
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
attr_reader :brand
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
attr_reader :brand_product
# Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
attr_reader :country
# Two-digit number representing the card's expiration month.
Expand Down Expand Up @@ -3099,10 +3103,10 @@ def self.search_auto_paging_each(params = {}, opts = {}, &blk)
end

# Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
def self.update(id, params = {}, opts = {})
def self.update(charge, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/charges/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/charges/%<charge>s", { charge: CGI.escape(charge) }),
params: params,
opts: opts
)
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/checkout/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3762,10 +3762,10 @@ def self.list_line_items(session, params = {}, opts = {})
end

# Updates a Session object.
def self.update(id, params = {}, opts = {})
def self.update(session, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/checkout/sessions/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/checkout/sessions/%<session>s", { session: CGI.escape(session) }),
params: params,
opts: opts
)
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/climate/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ def self.list(params = {}, opts = {})
end

# Updates the specified order by setting the values of the parameters passed.
def self.update(id, params = {}, opts = {})
def self.update(order, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/climate/orders/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/climate/orders/%<order>s", { order: CGI.escape(order) }),
params: params,
opts: opts
)
Expand Down
6 changes: 3 additions & 3 deletions lib/stripe/resources/confirmation_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class Wallet < Stripe::StripeObject
end

class Networks < Stripe::StripeObject
# All available networks for the card.
# All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
attr_reader :available
# The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
attr_reader :preferred
Expand Down Expand Up @@ -382,7 +382,7 @@ class ShippingAddress < Stripe::StripeObject

class CardPresent < Stripe::StripeObject
class Networks < Stripe::StripeObject
# All available networks for the card.
# All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
attr_reader :available
# The preferred network for the card.
attr_reader :preferred
Expand Down Expand Up @@ -482,7 +482,7 @@ class Ideal < Stripe::StripeObject

class InteracPresent < Stripe::StripeObject
class Networks < Stripe::StripeObject
# All available networks for the card.
# All networks available for selection via [payment_method_options.card.network](/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
attr_reader :available
# The preferred network for the card.
attr_reader :preferred
Expand Down
8 changes: 4 additions & 4 deletions lib/stripe/resources/coupon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ def self.create(params = {}, opts = {})
end

# You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.
def self.delete(id, params = {}, opts = {})
def self.delete(coupon, params = {}, opts = {})
request_stripe_object(
method: :delete,
path: format("/v1/coupons/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/coupons/%<coupon>s", { coupon: CGI.escape(coupon) }),
params: params,
opts: opts
)
Expand All @@ -247,10 +247,10 @@ def self.list(params = {}, opts = {})
end

# Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
def self.update(id, params = {}, opts = {})
def self.update(coupon, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/coupons/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/coupons/%<coupon>s", { coupon: CGI.escape(coupon) }),
params: params,
opts: opts
)
Expand Down
8 changes: 4 additions & 4 deletions lib/stripe/resources/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -892,10 +892,10 @@ def self.create_funding_instructions(customer, params = {}, opts = {})
end

# Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
def self.delete(id, params = {}, opts = {})
def self.delete(customer, params = {}, opts = {})
request_stripe_object(
method: :delete,
path: format("/v1/customers/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/customers/%<customer>s", { customer: CGI.escape(customer) }),
params: params,
opts: opts
)
Expand Down Expand Up @@ -997,10 +997,10 @@ def self.search_auto_paging_each(params = {}, opts = {}, &blk)
# Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.
#
# This request accepts mostly the same arguments as the customer creation call.
def self.update(id, params = {}, opts = {})
def self.update(customer, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/customers/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/customers/%<customer>s", { customer: CGI.escape(customer) }),
params: params,
opts: opts
)
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/dispute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,10 @@ def self.list(params = {}, opts = {})
# When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
#
# Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories).
def self.update(id, params = {}, opts = {})
def self.update(dispute, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/disputes/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/disputes/%<dispute>s", { dispute: CGI.escape(dispute) }),
params: params,
opts: opts
)
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/ephemeral_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def initialize(expand: nil)
attr_reader :secret

# Invalidates a short-lived API key for a given resource.
def self.delete(id, params = {}, opts = {})
def self.delete(key, params = {}, opts = {})
request_stripe_object(
method: :delete,
path: format("/v1/ephemeral_keys/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/ephemeral_keys/%<key>s", { key: CGI.escape(key) }),
params: params,
opts: opts
)
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/file_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ def self.list(params = {}, opts = {})
end

# Updates an existing file link object. Expired links can no longer be updated.
def self.update(id, params = {}, opts = {})
def self.update(link, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/file_links/%<id>s", { id: CGI.escape(id) }),
path: format("/v1/file_links/%<link>s", { link: CGI.escape(link) }),
params: params,
opts: opts
)
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe/resources/financial_connections/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def initialize(mode: nil)
attr_accessor :filters
# Settings for configuring Session-specific limits.
attr_accessor :limits
# Settings for configuring manual entry of account details for this Session.
# Customize manual entry behavior
attr_accessor :manual_entry
# List of data features that you would like to request access to.
#
Expand Down
Loading