Skip to content

Commit

Permalink
Merge pull request #1350 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Feb 29, 2024
2 parents e511e2f + 0d0cead commit 5edc370
Show file tree
Hide file tree
Showing 39 changed files with 1,017 additions and 1,003 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,24 @@
* Remove support for resource `Entitlements.Event`
* [#1343](https://github.com/stripe/stripe-ruby/pull/1343) Add a helper to add a beta version

## 10.11.0 - 2024-02-29
* [#1348](https://github.com/stripe/stripe-ruby/pull/1348) Use sorbet gem instead of sorbet-static
* [#1342](https://github.com/stripe/stripe-ruby/pull/1342) Update generated code
* Add `list_refunds` and `retrieve_refund` methods on resource `Charge`.
* [#1345](https://github.com/stripe/stripe-ruby/pull/1345) Update README to use add_beta_version

## 10.11.0 - 2024-02-29
* [#1348](https://github.com/stripe/stripe-ruby/pull/1348) Use sorbet gem instead of sorbet-static

## 10.11.0 - 2024-02-29
* [#1348](https://github.com/stripe/stripe-ruby/pull/1348) Use sorbet gem instead of sorbet-static
* [#1342](https://github.com/stripe/stripe-ruby/pull/1342) Update generated code
* Add `list_refunds` and `retrieve_refund` methods on resource `Charge`
* [#1345](https://github.com/stripe/stripe-ruby/pull/1345) Update README to use add_beta_version

## 10.11.0-beta.1 - 2024-02-22
* [#1335](https://github.com/stripe/stripe-ruby/pull/1335) Update generated code for beta


## 10.10.0 - 2024-02-22
* [#1336](https://github.com/stripe/stripe-ruby/pull/1336) Update generated code
- Add `InvoiceLineItem.update` method.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ group :development do
# don't install on truffleruby
gem "jaro_winkler", "1.5.4" unless RUBY_ENGINE == "truffleruby"

gem "sorbet-static"
gem "sorbet"
gem "tapioca"

platforms :mri do
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v854
v857
138 changes: 69 additions & 69 deletions lib/stripe/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,49 @@ def self.object_name
nested_resource_class_methods :login_link, operations: %i[create]
nested_resource_class_methods :person, operations: %i[create retrieve update delete list]

# With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
# To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
#
# If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when
# creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding.
# You can prefill any information on the account.
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.
#
# 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.
#
# 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 = {})
request_stripe_object(
method: :delete,
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
params: params,
opts: opts
)
end

# With [Connect](https://stripe.com/docs/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.
#
# 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 = {})
request_stripe_object(
method: :delete,
path: format("/v1/accounts/%<account>s", { account: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

# Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/accounts", params: filters, opts: opts)
end

# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
def persons(params = {}, opts = {})
request_stripe_object(
Expand All @@ -39,6 +82,16 @@ def persons(params = {}, opts = {})
)
end

# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
def self.persons(account, params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/accounts/%<account>s/persons", { account: CGI.escape(account) }),
params: params,
opts: opts
)
end

# With [Connect](https://stripe.com/docs/connect), you may flag accounts 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.
Expand All @@ -51,23 +104,31 @@ def reject(params = {}, opts = {})
)
end

# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
def self.persons(account, params = {}, opts = {})
# With [Connect](https://stripe.com/docs/connect), you may flag accounts 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.
def self.reject(account, params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/accounts/%<account>s/persons", { account: CGI.escape(account) }),
method: :post,
path: format("/v1/accounts/%<account>s/reject", { account: CGI.escape(account) }),
params: params,
opts: opts
)
end

# With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
# Updates a [connected account](https://stripe.com/docs/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
# left unchanged.
#
# 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.
def self.reject(account, params = {}, opts = {})
# 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 <a href="/docs/api/account_sessions">Account Session](https://stripe.com/docs/api/account_links),
# some properties can only be changed or updated for Custom accounts.
#
# 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 = {})
request_stripe_object(
method: :post,
path: format("/v1/accounts/%<account>s/reject", { account: CGI.escape(account) }),
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
params: params,
opts: opts
)
Expand Down Expand Up @@ -196,66 +257,5 @@ def deauthorize(client_id = nil, opts = {})
end
update_hash
end

# With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
# To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
#
# If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when
# creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding.
# You can prefill any information on the account.
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.
#
# 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.
#
# 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 = {})
request_stripe_object(
method: :delete,
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
params: params,
opts: opts
)
end

# With [Connect](https://stripe.com/docs/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.
#
# 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 = {})
request_stripe_object(
method: :delete,
path: format("/v1/accounts/%<account>s", { account: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

# Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/accounts", params: filters, opts: 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
# 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 <a href="/docs/api/account_sessions">Account Session](https://stripe.com/docs/api/account_links),
# some properties can only be changed or updated for Custom accounts.
#
# 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 = {})
request_stripe_object(
method: :post,
path: format("/v1/accounts/%<id>s", { id: CGI.escape(id) }),
params: params,
opts: opts
)
end
end
end
8 changes: 4 additions & 4 deletions lib/stripe/resources/apple_pay_domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ def self.object_name
"apple_pay_domain"
end

def self.resource_url
"/v1/apple_pay/domains"
end

# Create an apple pay domain.
def self.create(params = {}, opts = {})
request_stripe_object(
Expand Down Expand Up @@ -56,5 +52,9 @@ def self.list(filters = {}, opts = {})
opts: opts
)
end

def self.resource_url
"/v1/apple_pay/domains"
end
end
end
10 changes: 5 additions & 5 deletions lib/stripe/resources/apps/secret.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def self.object_name
"apps.secret"
end

# Create or replace a secret in the secret store.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/apps/secrets", params: params, opts: opts)
end

# Deletes a secret from the secret store by name and scope.
def self.delete_where(params = {}, opts = {})
request_stripe_object(
Expand All @@ -41,11 +46,6 @@ def self.find(params = {}, opts = {})
)
end

# Create or replace a secret in the secret store.
def self.create(params = {}, opts = {})
request_stripe_object(method: :post, path: "/v1/apps/secrets", params: params, opts: opts)
end

# List all secrets stored on the given scope.
def self.list(filters = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/apps/secrets", params: filters, opts: opts)
Expand Down
20 changes: 10 additions & 10 deletions lib/stripe/resources/capital/financing_offer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ def self.object_name
"capital.financing_offer"
end

# Retrieves the financing offers available for Connected accounts that belong to your platform.
def self.list(filters = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/capital/financing_offers",
params: filters,
opts: opts
)
end

# Acknowledges that platform has received and delivered the financing_offer to
# the intended merchant recipient.
def mark_delivered(params = {}, opts = {})
Expand All @@ -34,16 +44,6 @@ def self.mark_delivered(financing_offer, params = {}, opts = {})
opts: opts
)
end

# Retrieves the financing offers available for Connected accounts that belong to your platform.
def self.list(filters = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/capital/financing_offers",
params: filters,
opts: opts
)
end
end
end
end
42 changes: 21 additions & 21 deletions lib/stripe/resources/checkout/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ def self.object_name
"checkout.session"
end

# A Session can be expired when it is in one of these statuses: open
#
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
def expire(params = {}, opts = {})
# Creates a Session object.
def self.create(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/checkout/sessions/%<session>s/expire", { session: CGI.escape(self["id"]) }),
path: "/v1/checkout/sessions",
params: params,
opts: opts
)
end

# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list_line_items(params = {}, opts = {})
# A Session can be expired when it is in one of these statuses: open
#
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
def expire(params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(self["id"]) }),
method: :post,
path: format("/v1/checkout/sessions/%<session>s/expire", { session: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
Expand All @@ -60,32 +60,32 @@ def self.expire(session, params = {}, opts = {})
)
end

# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_line_items(session, params = {}, opts = {})
# Returns a list of Checkout Sessions.
def self.list(filters = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(session) }),
params: params,
path: "/v1/checkout/sessions",
params: filters,
opts: opts
)
end

# Creates a Session object.
def self.create(params = {}, opts = {})
# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def list_line_items(params = {}, opts = {})
request_stripe_object(
method: :post,
path: "/v1/checkout/sessions",
method: :get,
path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

# Returns a list of Checkout Sessions.
def self.list(filters = {}, opts = {})
# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
def self.list_line_items(session, params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/checkout/sessions",
params: filters,
path: format("/v1/checkout/sessions/%<session>s/line_items", { session: CGI.escape(session) }),
params: params,
opts: opts
)
end
Expand Down
Loading

0 comments on commit 5edc370

Please sign in to comment.