mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-11-27 00:03:06 -05:00
Merge pull request #1441 from stripe/latest-codegen-beta
Update generated code for beta
This commit is contained in:
commit
2a6f80ab14
@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 12.5.0 - 2024-08-08
|
||||
* [#1440](https://github.com/stripe/stripe-ruby/pull/1440) Update generated code
|
||||
* Add support for new resources `Billing.AlertTriggered` and `Billing.Alert`
|
||||
* Add support for `activate`, `archive`, `create`, `deactivate`, `list`, and `retrieve` methods on resource `Alert`
|
||||
* Add support for `retrieve` method on resource `Tax.Calculation`
|
||||
|
||||
## 12.5.0-beta.2 - 2024-08-01
|
||||
* [#1439](https://github.com/stripe/stripe-ruby/pull/1439) Update generated code for beta
|
||||
* Add support for `attach_payment` method on resource `Invoice`
|
||||
|
||||
@ -1 +1 @@
|
||||
v1165
|
||||
v1247
|
||||
@ -4,6 +4,6 @@
|
||||
module Stripe
|
||||
module ApiVersion
|
||||
CURRENT = "2024-06-20"
|
||||
PREVIEW = "2024-07-16.preview-v2"
|
||||
PREVIEW = "2024-09-05.preview-v2"
|
||||
end
|
||||
end
|
||||
|
||||
@ -140,6 +140,7 @@ module Stripe
|
||||
Terminal::ConnectionToken.object_name => Terminal::ConnectionToken,
|
||||
Terminal::Location.object_name => Terminal::Location,
|
||||
Terminal::Reader.object_name => Terminal::Reader,
|
||||
Terminal::ReaderCollectedData.object_name => Terminal::ReaderCollectedData,
|
||||
TestHelpers::TestClock.object_name => TestHelpers::TestClock,
|
||||
Token.object_name => Token,
|
||||
Topup.object_name => Topup,
|
||||
|
||||
@ -127,6 +127,7 @@ require "stripe/resources/terminal/configuration"
|
||||
require "stripe/resources/terminal/connection_token"
|
||||
require "stripe/resources/terminal/location"
|
||||
require "stripe/resources/terminal/reader"
|
||||
require "stripe/resources/terminal/reader_collected_data"
|
||||
require "stripe/resources/test_helpers/test_clock"
|
||||
require "stripe/resources/token"
|
||||
require "stripe/resources/topup"
|
||||
|
||||
@ -48,7 +48,7 @@ module Stripe
|
||||
#
|
||||
# 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.
|
||||
# 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 = {})
|
||||
@ -64,7 +64,7 @@ module Stripe
|
||||
#
|
||||
# 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.
|
||||
# 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 delete(params = {}, opts = {})
|
||||
|
||||
@ -4,6 +4,10 @@
|
||||
module Stripe
|
||||
# A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
|
||||
# control over a Customer.
|
||||
#
|
||||
# Related guides: [Customer Session with the Payment Element](https://stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods),
|
||||
# [Customer Session with the Pricing Table](https://stripe.com/payments/checkout/pricing-table#customer-session),
|
||||
# [Customer Session with the Buy Button](https://stripe.com/payment-links/buy-button#pass-an-existing-customer).
|
||||
class CustomerSession < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
|
||||
|
||||
@ -18,6 +18,23 @@ module Stripe
|
||||
"file"
|
||||
end
|
||||
|
||||
# To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
|
||||
#
|
||||
# All of Stripe's officially supported Client libraries support sending multipart/form-data.
|
||||
def self.create(params = {}, opts = {})
|
||||
config = opts[:client]&.config || Stripe.config
|
||||
upload_base = config.uploads_base
|
||||
opts = { api_base: upload_base }.merge(Util.normalize_opts(opts))
|
||||
|
||||
if params[:file] && !params[:file].is_a?(String) && !params[:file].respond_to?(:read)
|
||||
raise ArgumentError, "file must respond to `#read`"
|
||||
end
|
||||
|
||||
opts = { content_type: MultipartEncoder::MULTIPART_FORM_DATA }.merge(Util.normalize_opts(opts))
|
||||
|
||||
request_stripe_object(method: :post, path: "/v1/files", params: params, opts: opts)
|
||||
end
|
||||
|
||||
# Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
|
||||
def self.list(filters = {}, opts = {})
|
||||
request_stripe_object(method: :get, path: "/v1/files", params: filters, opts: opts)
|
||||
@ -35,18 +52,5 @@ module Stripe
|
||||
def self.resource_url
|
||||
"/v1/files"
|
||||
end
|
||||
|
||||
def self.create(params = {}, opts = {})
|
||||
if params[:file] && !params[:file].is_a?(String) && !params[:file].respond_to?(:read)
|
||||
raise ArgumentError, "file must respond to `#read`"
|
||||
end
|
||||
|
||||
config = opts[:client]&.config || Stripe.config
|
||||
opts = {
|
||||
api_base: config.uploads_base,
|
||||
content_type: MultipartEncoder::MULTIPART_FORM_DATA,
|
||||
}.merge(Util.normalize_opts(opts))
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
# Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice.
|
||||
#
|
||||
# Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items).
|
||||
class InvoiceLineItem < StripeObject
|
||||
include Stripe::APIOperations::Save
|
||||
|
||||
|
||||
@ -122,6 +122,9 @@ module Stripe
|
||||
# after those actions are completed. Your server needs to then
|
||||
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
||||
# attempt.
|
||||
# There is a variable upper limit on how many times a PaymentIntent can be confirmed.
|
||||
# After this limit is reached, any further calls to this endpoint will
|
||||
# transition the PaymentIntent to the canceled state.
|
||||
def confirm(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
@ -153,6 +156,9 @@ module Stripe
|
||||
# after those actions are completed. Your server needs to then
|
||||
# explicitly re-confirm the PaymentIntent to initiate the next payment
|
||||
# attempt.
|
||||
# There is a variable upper limit on how many times a PaymentIntent can be confirmed.
|
||||
# After this limit is reached, any further calls to this endpoint will
|
||||
# transition the PaymentIntent to the canceled state.
|
||||
def self.confirm(intent, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
|
||||
@ -208,7 +208,7 @@ module Stripe
|
||||
)
|
||||
end
|
||||
|
||||
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf)
|
||||
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
||||
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
||||
config = opts[:client]&.config || Stripe.config
|
||||
opts = { api_base: config.uploads_base }.merge(opts)
|
||||
@ -221,7 +221,7 @@ module Stripe
|
||||
)
|
||||
end
|
||||
|
||||
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf)
|
||||
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
||||
def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
|
||||
config = opts[:client]&.config || Stripe.config
|
||||
opts = { api_base: config.uploads_base }.merge(opts)
|
||||
|
||||
14
lib/stripe/resources/terminal/reader_collected_data.rb
Normal file
14
lib/stripe/resources/terminal/reader_collected_data.rb
Normal file
@ -0,0 +1,14 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Terminal
|
||||
# Returns data collected by Terminal readers. This data is only stored for 24 hours.
|
||||
class ReaderCollectedData < APIResource
|
||||
OBJECT_NAME = "terminal.reader_collected_data"
|
||||
def self.object_name
|
||||
"terminal.reader_collected_data"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -3,7 +3,9 @@
|
||||
|
||||
module Stripe
|
||||
module Treasury
|
||||
# Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
|
||||
# Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
|
||||
#
|
||||
# Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
|
||||
class InboundTransfer < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
@ -3,9 +3,11 @@
|
||||
|
||||
module Stripe
|
||||
module Treasury
|
||||
# Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
|
||||
# Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
|
||||
#
|
||||
# Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
|
||||
#
|
||||
# Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
|
||||
class OutboundPayment < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
@ -3,9 +3,11 @@
|
||||
|
||||
module Stripe
|
||||
module Treasury
|
||||
# Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
|
||||
# Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
|
||||
#
|
||||
# Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
|
||||
#
|
||||
# Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
|
||||
class OutboundTransfer < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user