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

Merged
merged 13 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
v1472
10 changes: 6 additions & 4 deletions lib/stripe/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ class Payouts < Stripe::StripeObject
attr_reader :charges
# Attribute for field payouts
attr_reader :payouts
# Represents the rejected reason of the account. Empty if account is not rejected, or rejected by Stripe. Please see [this page for more details](https://stripe.com/docs/connect/)
attr_reader :rejected_reason
end

class Settings < Stripe::StripeObject
Expand Down Expand Up @@ -5214,10 +5216,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 +5303,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
18 changes: 18 additions & 0 deletions lib/stripe/resources/account_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,20 @@ def initialize(enabled: nil, features: nil)
end
end

class ProductTaxCodeSelector < Stripe::RequestParams
class Features < Stripe::RequestParams
end
# Whether the embedded component is enabled.
attr_accessor :enabled
# The list of features enabled in the embedded component.
attr_accessor :features

def initialize(enabled: nil, features: nil)
@enabled = enabled
@features = features
end
end

class Recipients < Stripe::RequestParams
class Features < Stripe::RequestParams
# Whether to allow sending money.
Expand Down Expand Up @@ -889,6 +903,8 @@ def initialize(enabled: nil, features: nil)
attr_accessor :payouts
# Configuration for the payouts list embedded component.
attr_accessor :payouts_list
# Configuration for the product tax code selector embedded component.
attr_accessor :product_tax_code_selector
# Configuration for the recipients component.
attr_accessor :recipients
# Configuration for the reporting chart embedded component.
Expand Down Expand Up @@ -921,6 +937,7 @@ def initialize(
payments: nil,
payouts: nil,
payouts_list: nil,
product_tax_code_selector: nil,
recipients: nil,
reporting_chart: nil,
tax_registrations: nil,
Expand All @@ -947,6 +964,7 @@ def initialize(
@payments = payments
@payouts = payouts
@payouts_list = payouts_list
@product_tax_code_selector = product_tax_code_selector
@recipients = recipients
@reporting_chart = reporting_chart
@tax_registrations = tax_registrations
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
13 changes: 12 additions & 1 deletion lib/stripe/resources/billing/credit_balance_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,22 @@ class Monetary < Stripe::StripeObject
class RetrieveParams < Stripe::RequestParams
class Filter < Stripe::RequestParams
class ApplicabilityScope < Stripe::RequestParams
class Price < Stripe::RequestParams
# The price ID this credit grant should apply to.
attr_accessor :id

def initialize(id: nil)
@id = id
end
end
# The price type that credit grants can apply to. We currently only support the `metered` price type.
attr_accessor :price_type
# A list of prices that the credit grant can apply to. We currently only support the `metered` prices.
attr_accessor :prices

def initialize(price_type: nil)
def initialize(price_type: nil, prices: nil)
@price_type = price_type
@prices = prices
end
end
# The billing credit applicability scope for which to fetch credit balance summary.
Expand Down
19 changes: 18 additions & 1 deletion lib/stripe/resources/billing/credit_grant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ class Monetary < Stripe::StripeObject

class ApplicabilityConfig < Stripe::StripeObject
class Scope < Stripe::StripeObject
class Price < Stripe::StripeObject
# Unique identifier for the object.
attr_reader :id
end
# The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
attr_reader :price_type
# The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
attr_reader :prices
end
# Attribute for field scope
attr_reader :scope
Expand Down Expand Up @@ -91,11 +97,22 @@ def initialize(monetary: nil, type: nil)

class ApplicabilityConfig < Stripe::RequestParams
class Scope < Stripe::RequestParams
class Price < Stripe::RequestParams
# The price ID this credit grant should apply to.
attr_accessor :id

def initialize(id: nil)
@id = id
end
end
# The price type that credit grants can apply to. We currently only support the `metered` price type.
attr_accessor :price_type
# A list of prices that the credit grant can apply to. We currently only support the `metered` prices.
attr_accessor :prices

def initialize(price_type: nil)
def initialize(price_type: nil, prices: nil)
@price_type = price_type
@prices = prices
end
end
# Specify the scope of this applicability config.
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
Loading