Skip to content

Commit

Permalink
Update generated code (#1442)
Browse files Browse the repository at this point in the history
* Update generated code for v1196

* Update generated code for v1199

* Update generated code for v1202

* Update generated code for v1204

* Update generated code for v1211

* Update generated code for v1214

* Update generated code for v1230

* Update generated code for v1232

* Update generated code for v1235

* Update generated code for v1255

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Ramya Rao <[email protected]>
  • Loading branch information
stripe-openapi[bot] and ramya-stripe committed Sep 12, 2024
1 parent 27d87e9 commit 37b9771
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 8 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1187
v1255
1 change: 1 addition & 0 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def self.object_names_to_classes
Invoice.object_name => Invoice,
InvoiceItem.object_name => InvoiceItem,
InvoiceLineItem.object_name => InvoiceLineItem,
InvoiceRenderingTemplate.object_name => InvoiceRenderingTemplate,
Issuing::Authorization.object_name => Issuing::Authorization,
Issuing::Card.object_name => Issuing::Card,
Issuing::Cardholder.object_name => Issuing::Cardholder,
Expand Down
1 change: 1 addition & 0 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
require "stripe/resources/invoice"
require "stripe/resources/invoice_item"
require "stripe/resources/invoice_line_item"
require "stripe/resources/invoice_rendering_template"
require "stripe/resources/issuing/authorization"
require "stripe/resources/issuing/card"
require "stripe/resources/issuing/cardholder"
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def self.create(params = {}, opts = {})
#
# 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 = {})
Expand All @@ -64,7 +64,7 @@ def self.delete(id, params = {}, opts = {})
#
# 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 = {})
Expand Down
4 changes: 4 additions & 0 deletions lib/stripe/resources/customer_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions lib/stripe/resources/invoice_line_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
63 changes: 63 additions & 0 deletions lib/stripe/resources/invoice_rendering_template.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
class InvoiceRenderingTemplate < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "invoice_rendering_template"
def self.object_name
"invoice_rendering_template"
end

# Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
def archive(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoice_rendering_templates/%<template>s/archive", { template: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

# Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
def self.archive(template, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoice_rendering_templates/%<template>s/archive", { template: CGI.escape(template) }),
params: params,
opts: opts
)
end

# List all templates, ordered by creation date, with the most recently created template appearing first.
def self.list(filters = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/invoice_rendering_templates",
params: filters,
opts: opts
)
end

# Unarchive an invoice rendering template so it can be used on new Stripe objects again.
def unarchive(params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoice_rendering_templates/%<template>s/unarchive", { template: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

# Unarchive an invoice rendering template so it can be used on new Stripe objects again.
def self.unarchive(template, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/invoice_rendering_templates/%<template>s/unarchive", { template: CGI.escape(template) }),
params: params,
opts: opts
)
end
end
end
6 changes: 6 additions & 0 deletions lib/stripe/resources/payment_intent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ def self.capture(intent, params = {}, opts = {})
# 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,
Expand Down Expand Up @@ -153,6 +156,9 @@ def confirm(params = {}, opts = {})
# 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,
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources/quote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def self.list_line_items(quote, params = {}, opts = {})
)
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)
Expand All @@ -137,7 +137,7 @@ def pdf(params = {}, opts = {}, &read_body_chunk_block)
)
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)
Expand Down
4 changes: 3 additions & 1 deletion lib/stripe/resources/treasury/inbound_transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion lib/stripe/resources/treasury/outbound_payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion lib/stripe/resources/treasury/outbound_transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37b9771

Please sign in to comment.