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

Merged
merged 1 commit into from
Aug 1, 2024
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
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1156
v1165
44 changes: 44 additions & 0 deletions lib/stripe/resources/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,50 @@ def self.add_lines(invoice, params = {}, opts = {})
)
end

# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
#
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
#
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
# invoice's status becomes paid.
#
# If the PaymentIntent's status is already succeeded when it's attached, it's
# credited to the invoice immediately.
#
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
def attach_payment(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

# Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.
#
# For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid
# of the invoice and subsequently transitioning the status of the invoice to paid if necessary.
#
# For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
# invoice's status becomes paid.
#
# If the PaymentIntent's status is already succeeded when it's attached, it's
# credited to the invoice immediately.
#
# See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more.
def self.attach_payment(invoice, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoices/%<invoice>s/attach_payment", { invoice: CGI.escape(invoice) }),
params: params,
opts: opts
)
end

# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
# When the PaymentIntent's status changes to succeeded, the payment is credited
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
Expand Down
Loading