From 37b97715841c3e44dea0818f5fc53f9219705430 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:53:20 -0700 Subject: [PATCH] Update generated code (#1442) * 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 <100975018+ramya-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/stripe/object_types.rb | 1 + lib/stripe/resources.rb | 1 + lib/stripe/resources/account.rb | 4 +- lib/stripe/resources/customer_session.rb | 4 ++ lib/stripe/resources/invoice_line_item.rb | 3 + .../resources/invoice_rendering_template.rb | 63 +++++++++++++++++++ lib/stripe/resources/payment_intent.rb | 6 ++ lib/stripe/resources/quote.rb | 4 +- .../resources/treasury/inbound_transfer.rb | 4 +- .../resources/treasury/outbound_payment.rb | 4 +- .../resources/treasury/outbound_transfer.rb | 4 +- 12 files changed, 92 insertions(+), 8 deletions(-) create mode 100644 lib/stripe/resources/invoice_rendering_template.rb diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 369d9db7c..6dbaaddab 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1187 \ No newline at end of file +v1255 \ No newline at end of file diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index 16a335ba4..534ec945c 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -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, diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index bac03fadf..83aa7fdc5 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -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" diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index 8d20fe6c1..aaa3f36f9 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -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 = {}) @@ -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 = {}) diff --git a/lib/stripe/resources/customer_session.rb b/lib/stripe/resources/customer_session.rb index 9d66e044d..b6af08c28 100644 --- a/lib/stripe/resources/customer_session.rb +++ b/lib/stripe/resources/customer_session.rb @@ -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 diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb index a22c122b9..fb3c25ad1 100644 --- a/lib/stripe/resources/invoice_line_item.rb +++ b/lib/stripe/resources/invoice_line_item.rb @@ -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 diff --git a/lib/stripe/resources/invoice_rendering_template.rb b/lib/stripe/resources/invoice_rendering_template.rb new file mode 100644 index 000000000..81c0c23da --- /dev/null +++ b/lib/stripe/resources/invoice_rendering_template.rb @@ -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/%